Fix: Update-Button hängt nicht mehr (kein await update()), Wrapped-Modal × hinter Notch (safe-area) (SW by-v765)
This commit is contained in:
parent
7d89ed8bd2
commit
2854c60ba8
5 changed files with 9 additions and 10 deletions
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue