summaryrefslogtreecommitdiff
path: root/src/views/_sila/Motherboard
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-09-05 15:56:39 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-09-05 15:56:39 +0300
commit86de3af082ba6c541d9a6cb10c4db0d14f6267e8 (patch)
treed68f6f7560b98cbd9451e035198778f7fbf1b340 /src/views/_sila/Motherboard
parentfec1602b12c66e7675f4020d544886871cf5f5c9 (diff)
downloadwebui-vue-86de3af082ba6c541d9a6cb10c4db0d14f6267e8.tar.xz
add method for isNotAdmin
Diffstat (limited to 'src/views/_sila/Motherboard')
-rw-r--r--src/views/_sila/Motherboard/Dynamic/MotherboardTemp.vue9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/views/_sila/Motherboard/Dynamic/MotherboardTemp.vue b/src/views/_sila/Motherboard/Dynamic/MotherboardTemp.vue
index a8d1464b..4c8f3345 100644
--- a/src/views/_sila/Motherboard/Dynamic/MotherboardTemp.vue
+++ b/src/views/_sila/Motherboard/Dynamic/MotherboardTemp.vue
@@ -11,7 +11,7 @@
<b-form-group :label="$t('pageMotherboard.labels.warning')">
<b-form-input
v-model.number="warning"
- :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
+ :disabled="isNotAdmin"
type="number"
:state="getValidationState($v.warning)"
@blur="$v.warning.$touch()"
@@ -30,9 +30,7 @@
<b-button
variant="primary"
style="height: 35px"
- :disabled="
- loading || $store.getters['authentication/role'] === 'ReadOnly'
- "
+ :disabled="loading || isNotAdmin"
@click="saveLimit"
>
{{ $t('global.action.save') }}
@@ -161,6 +159,9 @@ export default {
},
computed: {
+ isNotAdmin() {
+ return this.$store.getters['authentication/role'] === 'ReadOnly';
+ },
groups() {
return getGroups(this.filteredSensors);
},