quintodrome/ui/src/reducers
Tom Boucher c42570446b
fix(ui): allow DefaultTheme "Auto" from config (#5190)
* fix(ui): allow DefaultTheme "Auto" from config

When DefaultTheme is set to "Auto" in the server config, the
defaultTheme() function in themeReducer now returns AUTO_THEME_ID
instead of falling through to the DarkTheme fallback.

This allows useCurrentTheme to correctly read prefers-color-scheme
and select Light or Dark theme automatically for new/incognito users.

Adds themeReducer unit tests covering Auto, named-theme, and
unrecognized-value fallback paths.

* chore: format

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
Co-authored-by: Deluan <deluan@navidrome.org>
2026-03-15 14:00:21 -04:00
..
activityReducer.js fix(ui): keep the NowPlayingPanel badge in sync. 2025-06-29 11:35:10 -04:00
activityReducer.test.js fix(ui): keep the NowPlayingPanel badge in sync. 2025-06-29 11:35:10 -04:00
albumView.js Reformat code with Prettier's new rules. 2023-12-18 15:12:24 -05:00
dialogReducer.js feat(ui) add Save Queue to Playlist (#4110) 2025-05-23 22:04:18 -04:00
index.js feat(ui): integrate transcode decision into web player (#5155) 2026-03-09 11:06:31 -04:00
libraryReducer.js fix(ui): fix library selection state for single-library users (#4686) 2025-11-15 17:42:28 -05:00
libraryReducer.test.js fix(ui): fix library selection state for single-library users (#4686) 2025-11-15 17:42:28 -05:00
playerReducer.js fix(ui): preserve pending track selection through queue sync and premature callbacks 2026-03-09 12:44:19 -04:00
playerReducer.test.js fix(ui): preserve pending track selection through queue sync and premature callbacks 2026-03-09 12:44:19 -04:00
replayGainReducer.js Use same key for replaygain's preAmp (#3184) 2024-08-03 21:18:41 -04:00
settingsReducer.js Option to toggle fields in songs, albums & artists (#923) 2021-05-24 11:09:06 -04:00
themeReducer.js fix(ui): allow DefaultTheme "Auto" from config (#5190) 2026-03-15 14:00:21 -04:00
themeReducer.test.js fix(ui): allow DefaultTheme "Auto" from config (#5190) 2026-03-15 14:00:21 -04:00
transcodingReducer.js feat(ui): integrate transcode decision into web player (#5155) 2026-03-09 11:06:31 -04:00
transcodingReducer.test.js feat(ui): integrate transcode decision into web player (#5155) 2026-03-09 11:06:31 -04:00