Skip to content

Commit

Permalink
r0b08x [chore] 3/8/2024, 2:31:19 PM
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed Mar 8, 2024
1 parent 4d291cb commit cc8390f
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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.126
# 💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io v2024.4.127



Expand Down Expand Up @@ -79,7 +79,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.126
[**P3X-REDIS-UI-MATERIAL**](https://corifeus.com/redis-ui-material) Build v2024.4.127

[![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.126",
"version": "2024.4.127",
"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
3 changes: 1 addition & 2 deletions src/angular/dialog/p3xr-dialog-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,10 @@ p3xr.ng.factory('p3xrDialogConnection', function (p3xrCommon, $mdDialog, p3xrSoc

try {

const cloneDeep = require('lodash/cloneDeep')
const response = await p3xrSocket.request({
action: 'connection-save',
payload: {
model: cloneDeep($scope.model)
model: global.p3xr.clone($scope.model)
},
})
p3xrCommon.toast({
Expand Down
3 changes: 1 addition & 2 deletions src/angular/layout/p3xr-layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ p3xr.ng.component('p3xrLayout', {
//p3xr.state.search = '';


const cloneDeep = require('lodash/cloneDeep')
connection = cloneDeep(connection)
connection = global.p3xr.clone(connection)
try {
const originalStateArr = location.pathname.split('/')
originalStateArr.shift()
Expand Down
3 changes: 1 addition & 2 deletions src/angular/pages/main/key/p3xr-main-key-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ p3xr.ng.component('p3xrMainKeyString', {
p3xrCommon.toast(p3xr.strings.status.dataCopied)
}

const cloneDeep = require('lodash/cloneDeep')
this.editable = false;
let originalValue
this.edit = () => {
originalValue = cloneDeep(this.p3xrValue)
originalValue = angular.copy(this.p3xrValue)
this.editable = true
}

Expand Down
3 changes: 1 addition & 2 deletions src/angular/pages/main/p3xr-main-treecontrol.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ p3xr.ng.component('p3xrMainTree', {
message: p3xr.strings.confirm.deleteKey
})

// const cloneDeep = require('lodash/cloneDeep')
//const expandedNodes = cloneDeep($rootScope.expandedNodes);
//const expandedNodes = global.p3xr.clone($rootScope.expandedNodes);

await p3xrSocket.request({
action: 'delete',
Expand Down
3 changes: 1 addition & 2 deletions src/angular/pages/p3xr-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,7 @@ p3xr.ng.component('p3xrMain', {
withoutParent = false
}

const cloneDeep = require('lodash/cloneDeep')
let expandedNodes = cloneDeep($rootScope.expandedNodes);
let expandedNodes = angular.copy($rootScope.expandedNodes);

try {
/*
Expand Down
20 changes: 20 additions & 0 deletions src/core/clone.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const cloneDeepWith = require('lodash/cloneDeepWith')
const isObject = require('lodash/isObject')
const transform = require('lodash/transform')

function customizer(value) {
if (isObject(value)) {
// Remove keys that start with '$'
return transform(value, (result, val, key) => {
if (!key.startsWith('$')) {
result[key] = val;
}
});
}
// For other types, no custom behavior
}

p3xr.clone = (value) => {
console.warn('clone, executed', value)
return cloneDeepWith(value, customizer)
}
1 change: 1 addition & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ require('./core/state')
require('./core/dom')
require('./core/sort')
require('./core/clipboard')
require('./core/clone')

require('./jquery/overlay')

Expand Down

0 comments on commit cc8390f

Please sign in to comment.