Fix: theme-color ein Tag mit id, inline-Script setzt Farbe sofort beim Laden — kein amber Streifen auf Samsung (SW by-v812)

This commit is contained in:
rene 2026-05-09 22:14:06 +02:00
parent 1fdd7d4ed0
commit 047e5be986
4 changed files with 17 additions and 17 deletions

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '811'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '812'; // ← 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
@ -621,12 +621,10 @@ const App = (() => {
}
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);
document.getElementById('meta-theme-color')?.setAttribute('content', isDark ? '#0f1623' : '#C4843A');
}
function _showVerifyBanner() {