diff --git a/README.md b/README.md index 4c8cc16..d2b78ee 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.150 +# 💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io v2024.4.153 @@ -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.150 +[**P3X-REDIS-UI-MATERIAL**](https://corifeus.com/redis-ui-material) Build v2024.4.153 [![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 4f85d18..43c64aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "p3x-redis-ui-material", - "version": "2024.4.150", + "version": "2024.4.153", "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 2d43506..c371746 100644 --- a/src/angular/dialog/p3xr-dialog-key-new-or-set.html +++ b/src/angular/dialog/p3xr-dialog-key-new-or-set.html @@ -82,6 +82,16 @@

+ + + + upload + {{ $root.p3xr.strings.intention.setBuffer }} + {{ + $root.p3xr.strings.intention.setBuffer }} + + + {{ $root.p3xr.strings.intention.jsonViewEditor }} 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 bde1e52..dbaf26d 100644 --- a/src/angular/dialog/p3xr-dialog-key-new-or-set.js +++ b/src/angular/dialog/p3xr-dialog-key-new-or-set.js @@ -11,6 +11,32 @@ p3xr.ng.factory('p3xrDialogKeyNewOrSet', function (p3xrCommon, $mdDialog, p3xrSo const result = await $mdDialog.show({ controller: function ($scope, $mdDialog) { + + $scope.setBufferUpload = () => { + const input = document.getElementById('p3xr-main-key-new-upload-buffer'); + input.value = ''; // Clear the input value + input.click(); + } + + $scope.readFileAsBuffer = async (event) => { + const file = event.target.files[0]; + if (!file) { + return; + } + const reader = new FileReader(); + reader.onload = async (loadEvent) => { + + const arrayBuffer = loadEvent.target.result; + $scope.model.value = arrayBuffer + console.log('buffer', $scope.model.value) + + }; + reader.onerror = (error) => { + p3xrCommon.generalHandleError(error) + } + reader.readAsArrayBuffer(file); + } + $scope.jsonViewer = (options) => { p3xrDialogJsonView.show({ event: options.$event, diff --git a/src/angular/pages/main/key/p3xr-main-key-hash.html b/src/angular/pages/main/key/p3xr-main-key-hash.html index 2c04359..a4ab163 100644 --- a/src/angular/pages/main/key/p3xr-main-key-hash.html +++ b/src/angular/pages/main/key/p3xr-main-key-hash.html @@ -38,6 +38,8 @@ content_copy + + download {{ $root.p3xr.strings.intention.downloadBuffer }} diff --git a/src/angular/pages/main/key/p3xr-main-key-set.html b/src/angular/pages/main/key/p3xr-main-key-set.html index b27b94c..2db5b30 100644 --- a/src/angular/pages/main/key/p3xr-main-key-set.html +++ b/src/angular/pages/main/key/p3xr-main-key-set.html @@ -20,7 +20,7 @@
- + {{ $root.p3xr.strings.intention.delete }} delete diff --git a/src/angular/pages/main/key/p3xr-main-key-set.js b/src/angular/pages/main/key/p3xr-main-key-set.js index a7df962..c7ae813 100644 --- a/src/angular/pages/main/key/p3xr-main-key-set.js +++ b/src/angular/pages/main/key/p3xr-main-key-set.js @@ -103,7 +103,7 @@ p3xr.ng.component('p3xrMainKeySet', { action: 'key-set-delete-member', payload: { key: this.p3xrKey, - value: options.value, + value: this.p3xrValueBuffer[options.$index], } }) $rootScope.$broadcast('p3xr-refresh-key'); 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 6bfc9b9..fa2dfc3 100644 --- a/src/angular/pages/main/key/p3xr-main-key-string.html +++ b/src/angular/pages/main/key/p3xr-main-key-string.html @@ -3,7 +3,7 @@ - + upload {{ $root.p3xr.strings.intention.setBuffer }} {{ diff --git a/src/angular/pages/main/key/p3xr-main-key-zset.html b/src/angular/pages/main/key/p3xr-main-key-zset.html index 38ed8cb..c6ab811 100644 --- a/src/angular/pages/main/key/p3xr-main-key-zset.html +++ b/src/angular/pages/main/key/p3xr-main-key-zset.html @@ -30,7 +30,7 @@
- + {{ $root.p3xr.strings.intention.delete }} delete diff --git a/src/angular/pages/main/key/p3xr-main-key-zset.js b/src/angular/pages/main/key/p3xr-main-key-zset.js index 56f614c..51c6813 100644 --- a/src/angular/pages/main/key/p3xr-main-key-zset.js +++ b/src/angular/pages/main/key/p3xr-main-key-zset.js @@ -146,7 +146,7 @@ p3xr.ng.component('p3xrMainKeyZset', { action: 'key-zset-delete-member', payload: { key: this.p3xrKey, - value: options.member, + value: this.p3xrValueBuffer[options.$index * 2 ], } }) $rootScope.$broadcast('p3xr-refresh-key'); diff --git a/src/angular/pages/p3xr-main.scss b/src/angular/pages/p3xr-main.scss index 49dc441..9a9a2bf 100644 --- a/src/angular/pages/p3xr-main.scss +++ b/src/angular/pages/p3xr-main.scss @@ -31,6 +31,8 @@ p3xr-main { } .p3xr-main-db-select { + position: relative; + top: -2px; .md-select-value { border-bottom: none !important; }