zwave-js / zwave-js-ui

Full featured Z-Wave Control Panel UI and MQTT gateway. Built using Nodejs, and Vue/Vuetify
https://zwave-js.github.io/zwave-js-ui
MIT License
920 stars 196 forks source link

Automatic light/dark mode #3607

Open yuejon opened 4 months ago

yuejon commented 4 months ago

Is your feature request related to a problem? Please describe. Currently, the dark mode toggle is locked in under the UI settings of the control panel. It used to be based on the selection at the login screen, but once logged in, it applies the setting that is saved under the user profile. Almost seems as if the toggle at the login screen is pointless since the user profile overrides it after getting logged in. I understand some people may want to have permanent dark mode but in my use case (and other folks perhaps), I use light mode when viewing the control panel on my desktop computer and dark mode on my phone.

Describe the solution you'd like Add an option to automatically select light/dark mode based on system settings instead of permanently locking to one or the other.

robertsLando commented 4 months ago

Add an option to automatically select light/dark mode based on system settings instead of permanently locking to one or the other.

This is the default behaviour when no mode is selected. Could you try to delete the preference from your local storage and settings?

yuejon commented 4 months ago

Is there a specific file I should be looking for to delete? I found settings.json and deleted the darkMode line but that didn't do anything.

robertsLando commented 4 months ago

@yuejon After that you should restart your applicaction, also you should be sure nothing is in your localstorage

yuejon commented 4 months ago

I'm using zwave-js-ui as a docker container. Which localstorage are you referring to? I've recreated the container and it did not make a difference. I'm not exactly comfortable with removing all my data in the container's volume (like backups etc.):

image

robertsLando commented 4 months ago

localstorage is a browser thing, you don't have to remove anythign from there. Anyway I need to speak with other users in order to understand if they prefer the actual usage or this

yuejon commented 4 months ago

Ah got it. I tried incognito mode on my browsers instead of clearing the cache and it seemed to stay on light mode without switching to dark mode on my phone.

robertsLando commented 4 months ago

@yuejon Yeah as said the default behaviour is to use the system theme so that's why it worked. If you set a theme it will store it on settings and local storage