From 8b4da2aac885635bea017fd2e6152ef043d58728 Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Mon, 30 Oct 2023 11:58:30 +0100 Subject: [PATCH] fix(ui): theme not persisted correctly Fixes #3382 --- src/App.vue | 3 +++ src/stores/base.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index 683bde6741..57081c9412 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1390,6 +1390,9 @@ export default { // set the dark mode to the system dark mode if it's different if (settings.load('dark') === undefined) { useBaseStore().setDarkMode(systemThemeDark) + } else { + // default to white + this.$vuetify.theme.dark = settings.load('dark', false) } useBaseStore().$onAction(({ name, args }) => { diff --git a/src/stores/base.js b/src/stores/base.js index e09c4731e9..56e2f584d2 100644 --- a/src/stores/base.js +++ b/src/stores/base.js @@ -97,7 +97,7 @@ const useBaseStore = defineStore('base', { newConfigVersion: undefined, }, ui: { - darkMode: settings.load('dark', false), + darkMode: settings.load('dark', undefined), // do not set a default here, otherwise the watch in App.vue will not trigger the change navTabs: settings.load('navTabs', false), compactMode: settings.load('compact', false), },