navidrome/ui
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
..
bin fix(ui): service worker crashing on precacheAndRoute (#3528) 2024-12-08 17:43:34 -05:00
build ci: create versions with goreleaser 2020-01-26 20:09:25 -05:00
public feat(ui): Add Nautiline like theme (#4909) 2026-01-20 12:11:47 -05:00
src fix(ui): allow DefaultTheme "Auto" from config (#5190) 2026-03-15 14:00:21 -04:00
.eslintignore test: update test command to run without watch mode 2025-05-24 22:58:04 -04:00
.eslintrc build(ui): migrate from CRA/Jest to Vite/Vitest (#3311) 2024-09-28 11:54:36 -04:00
.gitignore fix(ui): PWA not updating properly in new Vite config (#3493) 2024-11-30 10:33:16 -05:00
embed.go Fix build 2021-07-20 20:22:15 -04:00
index.html feat(plugins): add JSONForms-based plugin configuration UI (#4911) 2026-01-19 20:51:00 -05:00
package-lock.json chore(deps): bump dompurify in /ui (#5147) 2026-03-05 19:06:12 -05:00
package.json chore(deps): bump dompurify in /ui (#5147) 2026-03-05 19:06:12 -05:00
prettier.config.js build(ui): migrate from CRA/Jest to Vite/Vitest (#3311) 2024-09-28 11:54:36 -04:00
tsconfig.app.json build(ui): migrate from CRA/Jest to Vite/Vitest (#3311) 2024-09-28 11:54:36 -04:00
tsconfig.json build(ui): migrate from CRA/Jest to Vite/Vitest (#3311) 2024-09-28 11:54:36 -04:00
tsconfig.node.json build(ui): migrate from CRA/Jest to Vite/Vitest (#3311) 2024-09-28 11:54:36 -04:00
vite.config.js feat(plugins): add JSONForms-based plugin configuration UI (#4911) 2026-01-19 20:51:00 -05:00