mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-23 00:00:52 +00:00
When theme is set to "auto" (follow system), changing the OS from light to dark (or vice versa) without reloading the page had no effect. The theme was only evaluated once on page load. Added a matchMedia 'change' event listener that calls switchTheme() whenever the OS color scheme changes, but only when theme is "auto". Listener is properly cleaned up on component unmount. Fixes #6813 (point 1)