From 54a6a79158b72238e4ed5f7e9f4d5853024d891e Mon Sep 17 00:00:00 2001 From: Michi Date: Fri, 27 Nov 2026 00:02:42 +0100 Subject: [PATCH] theme: erststart (auch einrichtung) immer hell, statt windows-modus Kein gespeicherter Wert -> 'light' (vorher 'system'). Inline-Skript im head setzt das Theme flackerfrei vor dem ersten Paint; gespeicherte Wahl bleibt. Co-Authored-By: Claude Opus 4.8 --- public/app.js | 4 ++-- public/index.html | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/public/app.js b/public/app.js index 8f0f67e..999e595 100644 --- a/public/app.js +++ b/public/app.js @@ -3635,7 +3635,7 @@ function closeBackup() { // Theme mode: 'light', 'dark' or 'system' (follows Windows, also live when it changes). const systemDark = matchMedia('(prefers-color-scheme: dark)') -let themeMode = 'system' +let themeMode = 'light' // default until initTheme reads the saved choice (first start = light) function applyTheme() { const theme = themeMode === 'system' ? (systemDark.matches ? 'dark' : 'light') : themeMode @@ -3690,7 +3690,7 @@ function initTheme() { let saved = null try { saved = localStorage.getItem('dash.theme') } catch {} saved = new URLSearchParams(location.search).get('theme') ?? saved - themeMode = ['light', 'dark', 'system'].includes(saved) ? saved : 'system' + themeMode = ['light', 'dark', 'system'].includes(saved) ? saved : 'light' // first start (also setup): light applyTheme() } systemDark.addEventListener('change', () => { if (themeMode === 'system') applyTheme() }) diff --git a/public/index.html b/public/index.html index 02b332e..51e726d 100644 --- a/public/index.html +++ b/public/index.html @@ -1,9 +1,11 @@ - + Projekte + +