Feature: Dark Mode — System/Hell/Dunkel-Toggle in Einstellungen

CSS-Variablen für Dark Mode in design-system.css (system + manuell via
data-theme), Flash-freies Inline-Script in index.html, Toggle in
settings.js (by_theme in localStorage). SW by-v210, APP_VER 179.
This commit is contained in:
rene 2026-04-18 18:40:34 +02:00
parent eb72d6f675
commit eb3f7b94b2
4 changed files with 112 additions and 14 deletions

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '175'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '179'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const App = (() => {
@ -33,6 +33,7 @@ const App = (() => {
// ----------------------------------------------------------
const pages = {
welcome: { title: 'Willkommen', module: null },
onboarding: { title: 'Einrichtung', module: null, requiresAuth: true },
diary: { title: 'Tagebuch', module: null, requiresAuth: true },
health: { title: 'Gesundheit', module: null, requiresAuth: true },
'dog-profile': { title: 'Mein Hund', module: null, requiresAuth: true },
@ -413,9 +414,9 @@ const App = (() => {
}
await _loadDogs();
// Eingeloggter User ohne Hund (z.B. nach Reload) → direkt zur Hund-Anlage
if (state.dogs.length === 0) {
navigate('dog-profile');
// Eingeloggter User ohne Hund → Onboarding-Wizard (einmalig)
if (state.dogs.length === 0 && !localStorage.getItem('by_onboarding_done')) {
navigate('onboarding');
}
_updateNotifBadge();