Merge pull request #479 from YunoHost/fix-darkmode-init

fix dark mode initialization & default to light theme
This commit is contained in:
Alexandre Aubin 2022-10-27 13:52:02 +02:00 committed by GitHub
commit 7e7fdc7f68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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
}
}
</script>

View file

@ -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