justboil / admin-one-vue-tailwind

Free Vue.js 3.x Tailwind 3.x admin dashboard template with dark mode. Vite builds. Pinia state. Laravel integration available
https://justboil.github.io/admin-one-vue-tailwind/
MIT License
2.11k stars 399 forks source link

Preserve dark mode setting is not working properly #49

Open vquelque opened 10 months ago

vquelque commented 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

speightashley commented 9 months ago

I second this. I can't get DarkMode to persist at all.

256javy commented 1 month ago

This was fixed in #59