From 28540a51f46b0a4e252edc2563bb4ef13e91e0b9 Mon Sep 17 00:00:00 2001 From: DCsunset Date: Thu, 29 Oct 2020 21:01:02 +0800 Subject: [PATCH] fix(frontend): apply settings upon change --- frontend/pages/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/pages/index.vue b/frontend/pages/index.vue index d064b92..961a5e2 100644 --- a/frontend/pages/index.vue +++ b/frontend/pages/index.vue @@ -64,7 +64,6 @@ export default defineComponent({ } }; setAutoRefresh(); - watch(() => context.root.$store.state.settings, setAutoRefresh); // Auto Sync let syncInterval: NodeJS.Timeout | null = null; @@ -79,7 +78,13 @@ export default defineComponent({ } }; setAutoSync(); - watch(() => context.root.$store.state.settings, setAutoSync); + + // Update settings + watch(() => context.root.$store.state.settings, () => { + setAutoSync(); + setAutoRefresh(); + context.root.$vuetify.theme.dark = context.root.$store.state.settings.dark; + }); const mode = ref('Tasks'); const allModes = ['Tasks', 'Projects'];