Skip to content

Commit

Permalink
r0b08x [chore] 3/31/2024, 7:01:31 PM
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed Mar 31, 2024
1 parent 6ffd8c3 commit ef57e6b
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ https://corifeus.com/redis-ui


---
# 💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io v2024.4.208
# 💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io v2024.4.209



Expand Down Expand Up @@ -77,7 +77,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://

---

[**P3X-REDIS-UI-MATERIAL**](https://corifeus.com/redis-ui-material) Build v2024.4.208
[**P3X-REDIS-UI-MATERIAL**](https://corifeus.com/redis-ui-material) Build v2024.4.209

[![NPM](https://img.shields.io/npm/v/p3x-redis-ui-material.svg)](https://www.npmjs.com/package/p3x-redis-ui-material) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "p3x-redis-ui-material",
"version": "2024.4.208",
"version": "2024.4.209",
"description": "💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io",
"corifeus": {
"icon": "fas fa-database",
Expand Down
2 changes: 1 addition & 1 deletion src/angular/dialog/p3xr-dialog-key-new-or-set.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ <h2 flex md-truncate>


<div ng-if="valueType === 'object'" class="p3xr-md-input-container-bottom-info">
{{ $root.p3xr.strings.label.isBuffer }}
{{ $root.p3xr.strings.label.isBuffer }} {{ bufferDisplay(model.value) }}
</div>

<md-input-container class="md-block">
Expand Down
8 changes: 8 additions & 0 deletions src/angular/dialog/p3xr-dialog-key-new-or-set.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ p3xr.ng.factory('p3xrDialogKeyNewOrSet', function (p3xrCommon, $mdDialog, p3xrSo
controller: function ($scope, $mdDialog) {


const prettyBytes = require('pretty-bytes');

$scope.bufferDisplay = (value) => {
const result = '(' + prettyBytes(value.byteLength) + ')'
//console.log('bufferDisplay', result )
return result
}

$scope.setBufferUpload = () => {
const input = document.getElementById('p3xr-main-key-new-upload-buffer');
input.value = ''; // Clear the input value
Expand Down
9 changes: 5 additions & 4 deletions src/angular/pages/main/key/p3xr-main-key-string.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,22 @@
</span>
</div>

<div ng-if="$ctrl.editable">
<div ng-if="$ctrl.editable">
<md-input-container class="md-block">
<label>{{ $root.p3xr.strings.label.edit }}</label>
<label>{{ $root.p3xr.strings.label.edit }}</label>
<div class="p3xr-md-input-container-bottom-info" ng-if="$ctrl.p3xrValue && $ctrl.p3xrValue.toString() === '[object ArrayBuffer]'">
{{ $root.p3xr.strings.label.isBuffer }}
{{ $root.p3xr.strings.label.isBuffer }} {{$ctrl.bufferDisplay($ctrl.p3xrValue)}}
</div>
<textarea ng-model="$ctrl.p3xrValue" ng-if="!$ctrl.buffer" p3x-validate-json
p3x-validate-json-required="validateJson"></textarea>
<span ng-if="$ctrl.buffer">
<div class="p3xr-md-input-container-bottom-info">
{{ $root.p3xr.strings.label.isBuffer }}
{{ $root.p3xr.strings.label.isBuffer }} {{$ctrl.bufferDisplay($ctrl.p3xrValueBuffer)}}
</div>
<textarea ng-model="$ctrl.p3xrValueBuffer" p3x-validate-json
p3x-validate-json-required="validateJson"></textarea>
</span>

</md-input-container>
</div>
</div>
9 changes: 9 additions & 0 deletions src/angular/pages/main/key/p3xr-main-key-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ p3xr.ng.component('p3xrMainKeyString', {
input.click();
}


const prettyBytes = require('pretty-bytes');

this.bufferDisplay = (value) => {
const result = '(' + prettyBytes(value.byteLength) + ')'
//console.log('bufferDisplay', result )
return result
}

$scope.readFileAsBuffer = async (event) => {
const file = event.target.files[0];
if (!file) {
Expand Down
5 changes: 4 additions & 1 deletion src/angular/pages/main/p3xr-main-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ p3xr.ng.component('p3xrMainKey', {
case 'zn':
language = 'zh_CN'
break;
default:
case 'ru':
language = 'ru'
break;
default:
language = 'en'
break;
}
Expand Down

0 comments on commit ef57e6b

Please sign in to comment.