Skip to content

Commit

Permalink
fix(ui): theme not persisted correctly
Browse files Browse the repository at this point in the history
Fixes #3382
  • Loading branch information
robertsLando committed Oct 30, 2023
1 parent 79981be commit 8b4da2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/stores/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
},
Expand Down

0 comments on commit 8b4da2a

Please sign in to comment.