Skip to content

Commit

Permalink
r0b08x [chore] 3/24/2024, 7:05:06 AM
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed Mar 24, 2024
1 parent c30949a commit 5a6a949
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 8 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.150
# 💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io v2024.4.153



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.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)

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.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",
Expand Down
10 changes: 10 additions & 0 deletions src/angular/dialog/p3xr-dialog-key-new-or-set.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ <h2 flex md-truncate>
</span>
</span>


<input type="file" id="p3xr-main-key-new-upload-buffer" style="display: none" onchange="angular.element(this).scope().readFileAsBuffer(event)"/>
<md-button class="md-button md-raised md-primary" ng-click="setBufferUpload({ $event: $event})" ng-if="model.type !== 'stream'">
<md-icon>upload</md-icon>
<span hide-sm hide-xs>{{ $root.p3xr.strings.intention.setBuffer }}</span>
<md-tooltip ng-if="$root.$mdMedia('sm') || $root.$mdMedia('xs')" md-direction="bottom">{{
$root.p3xr.strings.intention.setBuffer }}
</md-tooltip>
</md-button>

<md-button class="md-button md-raised md-primary" ng-if="$root.p3xr.state.donated" ng-click="jsonEditor({ $event: $event, value: model.value})">
<i class="fas fa-file-alt"></i>
<span hide-sm hide-xs>{{ $root.p3xr.strings.intention.jsonViewEditor }}</span>
Expand Down
26 changes: 26 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 @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/angular/pages/main/key/p3xr-main-key-hash.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<md-icon>content_copy</md-icon>
</md-button>



<md-button class="md-icon-button md-accent" ng-click="$ctrl.downloadBuffer({ key: key, $event: $event})">
<md-icon>download</md-icon>
<md-tooltip>{{ $root.p3xr.strings.intention.downloadBuffer }}
Expand Down
2 changes: 1 addition & 1 deletion src/angular/pages/main/key/p3xr-main-key-set.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</div>
<div flex="5" style="text-align: right; ">

<md-button class="md-icon-button md-warn" ng-click="$ctrl.deleteSetMember({ value: value, $event: $event})" ng-if="$root.p3xr.state.connection.readonly !== true">
<md-button class="md-icon-button md-warn" ng-click="$ctrl.deleteSetMember({ $index: $index + (($ctrl.page -1) * $root.p3xr.settings.keyPageCount ), $event: $event})" ng-if="$root.p3xr.state.connection.readonly !== true">
<md-tooltip>{{ $root.p3xr.strings.intention.delete }}</md-tooltip>
<md-icon>delete</md-icon>
</md-button>
Expand Down
2 changes: 1 addition & 1 deletion src/angular/pages/main/key/p3xr-main-key-set.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/angular/pages/main/key/p3xr-main-key-string.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


<input type="file" id="p3xr-main-key-string-upload-buffer" style="display: none" onchange="angular.element(this).scope().readFileAsBuffer(event)"/>
<md-button class="md-button md-raised md-primary" ng-click="$ctrl.setBufferUpload({ $event: $event})">
<md-button class="md-button md-raised md-primary" ng-click="$ctrl.setBufferUpload({ $event: $event})" ng-if="$root.p3xr.state.connection.readonly !== true">
<md-icon>upload</md-icon>
<span hide-sm hide-xs>{{ $root.p3xr.strings.intention.setBuffer }}</span>
<md-tooltip ng-if="$root.$mdMedia('sm') || $root.$mdMedia('xs')" md-direction="bottom">{{
Expand Down
2 changes: 1 addition & 1 deletion src/angular/pages/main/key/p3xr-main-key-zset.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</div>
<div flex="20" style="text-align: right; ">

<md-button class="md-icon-button md-warn" ng-click="$ctrl.deleteZSet({ member: value[1], $event: $event})" ng-if="$root.p3xr.state.connection.readonly !== true">
<md-button class="md-icon-button md-warn" ng-click="$ctrl.deleteZSet({ $index: $index + (($ctrl.page -1) * $root.p3xr.settings.keyPageCount), $event: $event})" ng-if="$root.p3xr.state.connection.readonly !== true">
<md-tooltip>{{ $root.p3xr.strings.intention.delete }}</md-tooltip>
<md-icon>delete</md-icon>
</md-button>
Expand Down
2 changes: 1 addition & 1 deletion src/angular/pages/main/key/p3xr-main-key-zset.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions src/angular/pages/p3xr-main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ p3xr-main {
}

.p3xr-main-db-select {
position: relative;
top: -2px;
.md-select-value {
border-bottom: none !important;
}
Expand Down

0 comments on commit 5a6a949

Please sign in to comment.