Fix: Update-Loop entfernt (navigate kein Reload mehr), API-Header triggert Banner statt Redirect (SW by-v800)

This commit is contained in:
rene 2026-05-09 20:18:45 +02:00
parent e20e691c4d
commit 2a545377c1
4 changed files with 8 additions and 11 deletions

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '799'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '800'; // ← 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
@ -119,12 +119,6 @@ const App = (() => {
// ----------------------------------------------------------
function navigate(pageId, pushHistory = true, params = {}) {
if (!pages[pageId]) return;
// Neue Version vom Server erkannt → jetzt sicher neu laden (kein aktiver Speichervorgang)
if (window._byUpdatePending) {
window._byUpdatePending = false;
location.replace('/?_t=' + Date.now());
return;
}
if (window.Worlds?._visible) window.Worlds.hide();
// Aktive Seite ausblenden
@ -1102,7 +1096,8 @@ const App = (() => {
showOnboarding: _showOnboardingModal,
updateNotifBadge: _updateNotifBadge,
checkNearbyAlerts: _checkNearbyAlerts,
loadScript: _loadScript };
loadScript: _loadScript,
_triggerUpdateBanner: _showUpdateBanner };
})();