diff --git a/backend/main.py b/backend/main.py index 25ca4cd..0b52d19 100644 --- a/backend/main.py +++ b/backend/main.py @@ -341,7 +341,7 @@ MEDIA_DIR = os.getenv("MEDIA_DIR", "/data/media") os.makedirs(MEDIA_DIR, exist_ok=True) app.mount("/media", StaticFiles(directory=MEDIA_DIR), name="media") -APP_VER = "810" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "811" # muss mit APP_VER in app.js übereinstimmen @app.get("/.well-known/assetlinks.json") async def assetlinks(): diff --git a/backend/static/index.html b/backend/static/index.html index bc882ab..7859c66 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -97,9 +97,9 @@ - - - + + + @@ -579,10 +579,10 @@ - - - - + + + + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index f5c25d0..2c0f7dc 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '810'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '811'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.5.0'; // ← semantische Version, wird bei make release gesetzt const IS_STAGING = location.hostname === 'staging.banyaro.app'; // Cache-Bust-Parameter nach Update-Reload sofort entfernen @@ -612,11 +612,21 @@ const App = (() => { function _applyUserTheme(user) { const theme = user?.preferred_theme; - if (!theme || theme === 'system') return; // System-Einstellung: nichts tun + if (!theme || theme === 'system') { _syncThemeColor(); return; } localStorage.setItem('by_theme', theme); const html = document.documentElement; if (theme === 'dark') html.setAttribute('data-theme', 'dark'); else if (theme === 'light') html.setAttribute('data-theme', 'light'); + _syncThemeColor(); + } + + function _syncThemeColor() { + // Fallback für Browser die media-Queries auf theme-color meta nicht unterstützen (Samsung) + const isDark = document.documentElement.getAttribute('data-theme') === 'dark' + || (window.matchMedia('(prefers-color-scheme: dark)').matches + && document.documentElement.getAttribute('data-theme') !== 'light'); + const color = isDark ? '#0f1623' : '#C4843A'; + document.querySelector('meta[name="theme-color"]')?.setAttribute('content', color); } function _showVerifyBanner() { @@ -857,6 +867,7 @@ const App = (() => { // INITIALISIERUNG // ---------------------------------------------------------- async function init() { + _syncThemeColor(); // Statusleisten-Farbe sofort setzen // Spezielle Hash-Parameter → in App bleiben (kein /info-Redirect) const _rawHash = location.hash.replace('#', ''); const _hashQuery = _rawHash.split('?')[1] || ''; diff --git a/backend/static/js/pages/settings.js b/backend/static/js/pages/settings.js index 8108667..9eed700 100644 --- a/backend/static/js/pages/settings.js +++ b/backend/static/js/pages/settings.js @@ -334,9 +334,9 @@ window.Page_settings = (() => { background:var(--c-warning-subtle,rgba(245,158,11,0.12)); border:1px solid rgba(245,158,11,0.3); font-size:var(--text-xs);color:var(--c-text-secondary);line-height:1.5"> - Samsung Internet Tipp: - Für korrekte Farben im Samsung Browser unter - Einstellungen → Webseitenansicht → Dark Mode deaktivieren. + Samsung Internet Tipps:
+ • Farben: Einstellungen → Webseitenansicht → Dark Mode deaktivieren.
+ • Vollbild: Einstellungen → Display → Navigationsleiste → Wischgesten aktivieren. ` : ''} diff --git a/backend/static/sw.js b/backend/static/sw.js index 45c1954..3fa98b5 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -3,7 +3,7 @@ Offline-Cache + Push Notifications + Tile-Cache ============================================================ */ -const CACHE_VERSION = 'by-v810'; +const CACHE_VERSION = 'by-v811'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache