fix: auto theme does not update when OS switches day/night mode by jakub961241 · Pull Request #12278 · 1Panel-dev/1Panel
…l-dev#6813) 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 1Panel-dev#6813 (point 1)
HynoR pushed a commit to HynoR/1Panel that referenced this pull request
Mar 29, 2026…l-dev#6813) (1Panel-dev#12278) 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 1Panel-dev#6813 (point 1)
justadri pushed a commit to justadri/1Panel that referenced this pull request
Mar 29, 2026…l-dev#6813) (1Panel-dev#12278) 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 1Panel-dev#6813 (point 1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters