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
|
|
@ -578,7 +578,7 @@
|
|||
<script src="/js/api.js?v=94"></script>
|
||||
<script src="/js/ui.js?v=94"></script>
|
||||
<script src="/js/app.js?v=94"></script>
|
||||
<script src="/js/worlds.js?v=764"></script>
|
||||
<script src="/js/worlds.js?v=765"></script>
|
||||
|
||||
<!-- Feature-Seiten werden lazy geladen -->
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = `
|
||||
<div style="display:flex;justify-content:flex-end;padding:16px 20px 0">
|
||||
<button id="dp-wrapped-close" style="background:rgba(255,255,255,0.1);border:none;border-radius:50%;width:36px;height:36px;font-size:1.2rem;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center">×</button>
|
||||
<div style="display:flex;justify-content:flex-end;padding:max(16px,env(safe-area-inset-top)) 20px 0">
|
||||
<button id="dp-wrapped-close" style="background:rgba(255,255,255,0.1);border:none;border-radius:50%;width:44px;height:44px;font-size:1.4rem;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center">×</button>
|
||||
</div>
|
||||
<div style="flex:1;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative">
|
||||
<div id="dp-wrapped-card-container" style="width:100%;max-width:400px;color:#fff;">${cards[0]}</div>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Offline-Cache + Push Notifications + Tile-Cache
|
||||
============================================================ */
|
||||
|
||||
const CACHE_VERSION = 'by-v764';
|
||||
const CACHE_VERSION = 'by-v765';
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue