From 263d1cb2d7d93f0c7cb0f9b56ac6cb19ad26c4fd Mon Sep 17 00:00:00 2001 From: axolotle Date: Wed, 26 Oct 2022 15:36:25 +0200 Subject: [PATCH] fix dark mode initialization & default to light theme --- app/src/App.vue | 2 +- app/src/store/settings.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/App.vue b/app/src/App.vue index c5ac51d3..0342e34f 100644 --- a/app/src/App.vue +++ b/app/src/App.vue @@ -160,7 +160,7 @@ export default { this.$store.commit('SET_SPINNER', 'spookycat') } - document.documentElement.setAttribute('dark-theme', localStorage.getItem('theme')) // updates the data-theme attribute + document.documentElement.setAttribute('dark-theme', this.theme) // updates the data-theme attribute } } diff --git a/app/src/store/settings.js b/app/src/store/settings.js index 9d94c620..6c4341e9 100644 --- a/app/src/store/settings.js +++ b/app/src/store/settings.js @@ -13,7 +13,7 @@ export default { fallbackLocale: localStorage.getItem('fallbackLocale'), cache: localStorage.getItem('cache') !== 'false', transitions: localStorage.getItem('transitions') !== 'false', - theme: localStorage.getItem('theme') !== 'false', + theme: localStorage.getItem('theme') === 'true', experimental: localStorage.getItem('experimental') === 'true', spinner: 'pacman', supportedLocales: supportedLocales