Open vquelque opened 10 months ago
Currently, the "preserve dark mode" setting is not working properly, even by uncommenting the required lines in main.js and darkMode.js The reason is that the value used to set the darkMode key in darkMode.js::localStorage.setItem() should be this.isEnabled ? '1' : '0' instead of this.darkMode ? '1' : '0'. Indeed, the darkMode ref does not exist. https://github.com/justboil/admin-one-vue-tailwind/blob/fffb685de6151436ff6f3f0ffd0e0a11b7616df7/src/stores/darkMode.js#L19-L23
main.js
darkMode.js
darkMode
darkMode.js::localStorage.setItem()
this.isEnabled ? '1' : '0'
this.darkMode ? '1' : '0'
I second this. I can't get DarkMode to persist at all.
This was fixed in #59
Currently, the "preserve dark mode" setting is not working properly, even by uncommenting the required lines in
main.js
anddarkMode.js
The reason is that the value used to set thedarkMode
key indarkMode.js::localStorage.setItem()
should bethis.isEnabled ? '1' : '0'
instead ofthis.darkMode ? '1' : '0'
. Indeed, thedarkMode
ref does not exist. https://github.com/justboil/admin-one-vue-tailwind/blob/fffb685de6151436ff6f3f0ffd0e0a11b7616df7/src/stores/darkMode.js#L19-L23