summaryrefslogtreecommitdiff
path: root/src/views/Control/ServerLed/ServerLed.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/Control/ServerLed/ServerLed.vue')
-rw-r--r--src/views/Control/ServerLed/ServerLed.vue12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/views/Control/ServerLed/ServerLed.vue b/src/views/Control/ServerLed/ServerLed.vue
index 0e5bf500..5b99e07c 100644
--- a/src/views/Control/ServerLed/ServerLed.vue
+++ b/src/views/Control/ServerLed/ServerLed.vue
@@ -27,15 +27,16 @@
</template>
<script>
-import PageTitle from '../../../components/Global/PageTitle';
-import PageSection from '../../../components/Global/PageSection';
+import PageTitle from '@/components/Global/PageTitle';
+import PageSection from '@/components/Global/PageSection';
+import BVToastMixin from '@/components/Mixins/BVToastMixin';
import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin';
export default {
name: 'ServerLed',
components: { PageTitle, PageSection },
- mixins: [LoadingBarMixin],
+ mixins: [LoadingBarMixin, BVToastMixin],
computed: {
indicatorLED: {
get() {
@@ -43,7 +44,10 @@ export default {
},
set(newValue) {
if (newValue) {
- this.$store.dispatch('serverLed/saveIndicatorLedValue', newValue);
+ this.$store
+ .dispatch('serverLed/saveIndicatorLedValue', newValue)
+ .then(message => this.successToast(message))
+ .catch(({ message }) => this.errorToast(message));
}
}
}