From e4c1b04498532eceddcd3955780badbaae777ced Mon Sep 17 00:00:00 2001 From: patrikx3 Date: Mon, 25 Mar 2024 12:15:39 +0100 Subject: [PATCH] r0b08x [chore] 3/25/2024, 12:15:39 PM --- README.md | 4 ++-- package.json | 2 +- .../dialog/p3xr-dialog-key-new-or-set.js | 3 +-- .../pages/main/key/p3xr-main-key-string.html | 2 +- .../pages/main/key/p3xr-main-key-string.js | 24 +++++++++---------- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 54e4d49..aa4a366 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.161 +# 💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io v2024.4.163 @@ -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.161 +[**P3X-REDIS-UI-MATERIAL**](https://corifeus.com/redis-ui-material) Build v2024.4.163 [![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 7e85d8b..5a28d3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "p3x-redis-ui-material", - "version": "2024.4.161", + "version": "2024.4.163", "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.js b/src/angular/dialog/p3xr-dialog-key-new-or-set.js index 9cab3a0..51c532e 100644 --- a/src/angular/dialog/p3xr-dialog-key-new-or-set.js +++ b/src/angular/dialog/p3xr-dialog-key-new-or-set.js @@ -127,14 +127,13 @@ p3xr.ng.factory('p3xrDialogKeyNewOrSet', function (p3xrCommon, $mdDialog, p3xrSo return; } try { - const cloneDeep = require('lodash/cloneDeep') const response = await p3xrSocket.request({ action: 'key-new-or-set', payload: { type: options.type, originalValue: options.hasOwnProperty('model') ? options.model.value : undefined, originalHashKey: options.hasOwnProperty('model') ? options.model.hashKey : undefined, - model: cloneDeep($scope.model) + model: p3xr.clone($scope.model) }, }) window['gtag']('config', p3xr.settings.googleAnalytics, 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 faec9ca..0b4b401 100644 --- a/src/angular/pages/main/key/p3xr-main-key-string.html +++ b/src/angular/pages/main/key/p3xr-main-key-string.html @@ -68,7 +68,7 @@
{{ $root.p3xr.strings.label.validateJson }} - +
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 6106f74..38020fd 100644 --- a/src/angular/pages/main/key/p3xr-main-key-string.js +++ b/src/angular/pages/main/key/p3xr-main-key-string.js @@ -94,10 +94,10 @@ p3xr.ng.component('p3xrMainKeyString', { let originalValue this.edit = () => { if (this.p3xrValue.length < p3xr.settings.maxValueAsBuffer ) { - originalValue = angular.copy(this.p3xrValue) + originalValue = p3xr.clone(this.p3xrValue) this.buffer = false } else { - originalValue = angular.copy(this.p3xrValueBuffer) + originalValue = p3xr.clone(this.p3xrValueBuffer) this.buffer = true } this.editable = true @@ -117,18 +117,18 @@ p3xr.ng.component('p3xrMainKeyString', { this.validateJson = false this.save = async () => { - try { - if (this.validateJson === true) { - try { - JSON.parse(this.buffer ? this.p3xrValueBuffer : this.p3xrValue) - } catch (e) { - p3xrCommon.toast({ - message: p3xr.strings.label.jsonViewNotParsable - }) - return; - } + if (this.validateJson === true) { + try { + JSON.parse(this.buffer ? this.p3xrValueBuffer : this.p3xrValue) + } catch (e) { + p3xrCommon.toast({ + message: p3xr.strings.label.jsonViewNotParsable + }) + return } + } + try { const response = await p3xrSocket.request({ action: 'key-set', payload: {