diff --git a/backend/main.py b/backend/main.py index 32cd7e6..9806d71 100644 --- a/backend/main.py +++ b/backend/main.py @@ -327,7 +327,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 = "764" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "765" # muss mit APP_VER in app.js übereinstimmen @app.get("/api/version") async def app_version(): diff --git a/backend/static/index.html b/backend/static/index.html index cfe32d2..50b42f8 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -578,7 +578,7 @@ - + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 5666b13..50f2399 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 = '764'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '765'; // ← 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'; @@ -1037,16 +1037,15 @@ const App = (() => { btn.textContent = 'Lädt…'; btn.disabled = true; sessionStorage.setItem('by_update_reload', APP_VER); + // Reload immer nach 800ms — NICHT auf SW-Operationen warten (können auf iOS hängen) + setTimeout(() => location.replace(location.href), 800); try { - // SW aktivieren + alle Caches leeren für sauberen Reload const reg = await navigator.serviceWorker?.getRegistration(); if (reg?.waiting) reg.waiting.postMessage({ type: 'SKIP_WAITING' }); - await reg?.update(); + reg?.update().catch(() => {}); // kein await — kann hängen const keys = await caches.keys(); await Promise.all(keys.map(k => caches.delete(k))); } catch { /* ignorieren */ } - // location.replace bypassed iOS bfcache (reload() stellt alte Seite wieder her) - setTimeout(() => location.replace(location.href), 600); }); } diff --git a/backend/static/js/pages/dog-profile.js b/backend/static/js/pages/dog-profile.js index 58d5aa7..bdbf999 100644 --- a/backend/static/js/pages/dog-profile.js +++ b/backend/static/js/pages/dog-profile.js @@ -2073,8 +2073,8 @@ window.Page_dog_profile = (() => { const modalEl = document.createElement('div'); modalEl.style.cssText = 'position:fixed;inset:0;z-index:9999;background:#0d0d1a;display:flex;flex-direction:column;overflow:hidden;'; modalEl.innerHTML = ` -