updated initial state of dark mode and slim downloads setting to be coherent with localStorage

This commit is contained in:
Roberto Tonino 2020-05-05 21:59:35 +02:00
parent d5b782fda9
commit 1087d0ee0c
1 changed files with 5 additions and 0 deletions

View File

@ -95,11 +95,16 @@ const SettingsTab = new Vue({
mounted() { mounted() {
socket.on('init_settings', this.initSettings) socket.on('init_settings', this.initSettings)
socket.on('updateSettings', this.updateSettings) socket.on('updateSettings', this.updateSettings)
let spotyUser = localStorage.getItem('spotifyUser') let spotyUser = localStorage.getItem('spotifyUser')
if ('' !== spotyUser) { if ('' !== spotyUser) {
this.lastUser = spotyUser this.lastUser = spotyUser
this.spotifyUser = spotyUser this.spotifyUser = spotyUser
} }
this.changeDarkMode = 'true' === localStorage.getItem('darkMode')
this.changeSlimDownloads = 'true' === localStorage.getItem('slimDownloads')
} }
}).$mount('#settings_tab') }).$mount('#settings_tab')