Add 'Waldnacht' dark theme and theme selector (system/light/dark) #1
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/dark-theme"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This change adds a new dark theme (named “Waldnacht”) and a theme selector that lets users choose
system,lightordark. The app now applies a theme at startup, persists the selection to localStorage, updates the documentdata-themeattribute at runtime, and keeps the browsermeta[name="theme-color"]in sync with the current theme.Key behavior changes
SunMoonicon). The select stores the chosen theme and updates the UI immediately.src/App.tsx(importsinitialTheme,themeTranslations,themes, addsthemestate, adds settings select).data-themeattribute is set ondocument.documentElementwhen a non-systemtheme is chosen.src/main.tsx(callsinitialTheme()and appliesdocument.documentElement.dataset.theme = theme).localStoragekeywallpaperflow-theme, sets/removesdata-themeforsystembehavior, and registers a listener forprefers-color-schemechanges to update the pagemeta[name="theme-color"]to match--shell.src/App.tsx(effect that writes to localStorage, updates dataset and meta theme-color, and listens forprefers-color-schemechanges).@media (prefers-color-scheme: dark)(for system-dark) and via:root[data-theme="dark"](for forced dark). This introduces many theme tokens (e.g.--bg,--shell,--surface,--text, etc.) used across the stylesheet so components respond to the active theme.src/styles.css(new variables, data-theme handling, and many color references switched to variables).android:windowBackgroundfor night and day values to match the new visual treatment.src-tauri/gen/android/app/src/main/res/values-night/themes.xmlandsrc-tauri/gen/android/app/src/main/res/values/themes.xml(windowBackground values changed).Notes about scope
Testing
No test execution results were provided.
Recommended manual checks for reviewers
darkorlightand reload the app; confirmlocalStorage.getItem("wallpaperflow-theme")contains the selection and the page applies the chosen theme on load (document.documentElement.dataset.theme).system, then change OS/browserprefers-color-schemebetween light/dark and confirm UI updates accordingly and the pagemeta[name="theme-color"]reflects the CSS--shellvalue.themes.xmlfiles.Compatibility / reviewer actions
data-themeis applied only when a non-systemtheme is chosen; otherwise the implementation defers to the OS preference.If you want, I can list the specific new/changed tokens or point to a small checklist of DOM selectors to inspect while testing.