diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-09-05 15:56:39 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-09-05 15:56:39 +0300 |
commit | 86de3af082ba6c541d9a6cb10c4db0d14f6267e8 (patch) | |
tree | d68f6f7560b98cbd9451e035198778f7fbf1b340 /src/views/_sila/Operations/VirtualMedia | |
parent | fec1602b12c66e7675f4020d544886871cf5f5c9 (diff) | |
download | webui-vue-86de3af082ba6c541d9a6cb10c4db0d14f6267e8.tar.xz |
add method for isNotAdmin
Diffstat (limited to 'src/views/_sila/Operations/VirtualMedia')
-rw-r--r-- | src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue b/src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue index 4c3f4da0..e283867c 100644 --- a/src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue +++ b/src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue @@ -17,9 +17,7 @@ v-if="!dev.isActive" :id="concatId(dev.id)" v-model="dev.file" - :disabled=" - $store.getters['authentication/role'] === 'ReadOnly' - " + :disabled="isNotAdmin" > <template #invalid> <b-form-invalid-feedback role="alert"> @@ -76,10 +74,7 @@ > <b-button variant="primary" - :disabled=" - device.isActive || - $store.getters['authentication/role'] === 'ReadOnly' - " + :disabled="device.isActive || isNotAdmin" @click="configureConnection(device)" > {{ $t('pageVirtualMedia.configureConnection') }} @@ -135,6 +130,9 @@ export default { }; }, computed: { + isNotAdmin() { + return this.$store.getters['authentication/role'] === 'ReadOnly'; + }, proxyDevices() { return this.$store.getters['virtualMedia/proxyDevices']; }, |