From ef57e6ba03231bced318ff729caa7557c8833a62 Mon Sep 17 00:00:00 2001 From: patrikx3 Date: Sun, 31 Mar 2024 19:01:31 +0200 Subject: [PATCH] r0b08x [chore] 3/31/2024, 7:01:31 PM --- README.md | 4 ++-- package.json | 2 +- src/angular/dialog/p3xr-dialog-key-new-or-set.html | 2 +- src/angular/dialog/p3xr-dialog-key-new-or-set.js | 8 ++++++++ src/angular/pages/main/key/p3xr-main-key-string.html | 9 +++++---- src/angular/pages/main/key/p3xr-main-key-string.js | 9 +++++++++ src/angular/pages/main/p3xr-main-key.js | 5 ++++- 7 files changed, 30 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0ceb6a4..555575d 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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) diff --git a/package.json b/package.json index d99f437..a16cdbb 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/angular/dialog/p3xr-dialog-key-new-or-set.html b/src/angular/dialog/p3xr-dialog-key-new-or-set.html index ea50309..7f716b0 100644 --- a/src/angular/dialog/p3xr-dialog-key-new-or-set.html +++ b/src/angular/dialog/p3xr-dialog-key-new-or-set.html @@ -132,7 +132,7 @@

- {{ $root.p3xr.strings.label.isBuffer }} + {{ $root.p3xr.strings.label.isBuffer }} {{ bufferDisplay(model.value) }}
diff --git a/src/angular/dialog/p3xr-dialog-key-new-or-set.js b/src/angular/dialog/p3xr-dialog-key-new-or-set.js index 645a8f4..78176ba 100644 --- a/src/angular/dialog/p3xr-dialog-key-new-or-set.js +++ b/src/angular/dialog/p3xr-dialog-key-new-or-set.js @@ -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 diff --git a/src/angular/pages/main/key/p3xr-main-key-string.html b/src/angular/pages/main/key/p3xr-main-key-string.html index 979f097..db3ca8c 100644 --- a/src/angular/pages/main/key/p3xr-main-key-string.html +++ b/src/angular/pages/main/key/p3xr-main-key-string.html @@ -106,21 +106,22 @@ -
+
- +
- {{ $root.p3xr.strings.label.isBuffer }} + {{ $root.p3xr.strings.label.isBuffer }} {{$ctrl.bufferDisplay($ctrl.p3xrValue)}}
- {{ $root.p3xr.strings.label.isBuffer }} + {{ $root.p3xr.strings.label.isBuffer }} {{$ctrl.bufferDisplay($ctrl.p3xrValueBuffer)}}
+
diff --git a/src/angular/pages/main/key/p3xr-main-key-string.js b/src/angular/pages/main/key/p3xr-main-key-string.js index 88fb12d..adea19f 100644 --- a/src/angular/pages/main/key/p3xr-main-key-string.js +++ b/src/angular/pages/main/key/p3xr-main-key-string.js @@ -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) { diff --git a/src/angular/pages/main/p3xr-main-key.js b/src/angular/pages/main/p3xr-main-key.js index 5f9b3b2..80c6d58 100644 --- a/src/angular/pages/main/p3xr-main-key.js +++ b/src/angular/pages/main/p3xr-main-key.js @@ -78,7 +78,10 @@ p3xr.ng.component('p3xrMainKey', { case 'zn': language = 'zh_CN' break; - default: + case 'ru': + language = 'ru' + break; + default: language = 'en' break; }