dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

style: add dark mode 💄

Open flixlix opened this issue 2 years ago • 2 comments

Add Dark Mode 💄

Note: this PR is dependent on https://github.com/esphome/dashboard/pull/514

Not sure if this is the most efficient implementation of a dark mode toggle.

Another Issue I unfortunately don't know how to fix is, saving this choice in local storage, would love to get some guidance on how to achieve that.

The theme automatically updates in case the system preferences change before or during using the page. Furthermore, there is a toggle if, for some reason, the theme doesn't match the user's preferences.

Here are some screenshots of how this looks like:

Toolbar in Light Mode:

Light Mode Toolbar

Toolbar in Dark Mode:

Dark Mode Toolbar

Tooltip on hover:

Tooltip

Behaviour:

https://github.com/esphome/dashboard/assets/61006057/9a6a1ba5-d664-4d74-9ecb-97e695034c4f

Light Mode:

Light Mode

Dark Mode:

Dark Mode

flixlix avatar Jul 26 '23 18:07 flixlix

Nice, but please without that toggle button. Mode has to be switched via browser settings (discord thread)

randybb avatar Jul 26 '23 20:07 randybb

Nice, but please without that toggle button. Mode has to be switched via browser settings (discord thread)

Removed the toggle. Thanks for pointing it out 👍

flixlix avatar Jul 26 '23 21:07 flixlix