Skip to content

Commit

Permalink
disable (un)lock, sync and reboot buttons on memberbucks devices
Browse files Browse the repository at this point in the history
  • Loading branch information
jabelone committed Jun 4, 2024
1 parent 1d1d565 commit 6334753
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions src-frontend/src/components/AdminTools/DeviceDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@

<div class="row">
<q-btn
:disable="unlockLoading || device.offline"
:disable="
unlockLoading || device.offline || disabled.unlock
"
:loading="unlockLoading"
class="q-mr-sm"
size="sm"
Expand All @@ -160,7 +162,7 @@
</q-btn>

<q-btn
:disable="lockLoading || device.offline"
:disable="lockLoading || device.offline || disabled.lock"
:loading="lockLoading"
class="q-mr-sm"
size="sm"
Expand All @@ -174,7 +176,9 @@
</q-btn>

<q-btn
:disable="rebootLoading || device.offline"
:disable="
rebootLoading || device.offline || disabled.reboot
"
:loading="rebootLoading"
class="q-mr-sm"
size="sm"
Expand All @@ -188,7 +192,7 @@
</q-btn>

<q-btn
:disable="syncLoading || device.offline"
:disable="syncLoading || device.offline || disabled.sync"
:loading="syncLoading"
class="q-mr-sm"
size="sm"
Expand Down Expand Up @@ -314,6 +318,12 @@ export default {
loading: false,
errorLoading: false,
updateInterval: null,
disabled: {
unlock: false,
lock: false,
reboot: false,
sync: false,
},
filter: '',
devicePagination: {
sortBy: 'desc',
Expand Down Expand Up @@ -374,6 +384,12 @@ export default {
(item) => String(item.id) === this.deviceId
);
} else if (this.deviceType === 'memberbucks-devices') {
this.disabled = {
unlock: true,
lock: true,
reboot: true,
sync: true,
};
this.deviceIndex = this.memberbucksDevices.findIndex(
(item) => String(item.id) === this.deviceId
);
Expand Down Expand Up @@ -568,7 +584,6 @@ export default {
},
onNextClick() {
let newDevice;
this.deviceIndex = this.deviceIndex + 1;
this.initForm();
},
Expand Down

0 comments on commit 6334753

Please sign in to comment.