Fix: Nicht eingeloggte User landen immer auf Welcome — auch bei direktem Hash-Link

navigate() beim Start prüft jetzt state.user; #forum, #wiki etc. werden
für Nicht-Eingeloggte auf welcome umgeleitet. SW by-v571, APP_VER 548
This commit is contained in:
rene 2026-04-30 19:27:48 +02:00
parent de02169c57
commit 87aeed8de8
2 changed files with 4 additions and 3 deletions

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung. Router, State-Management, Navigation, Initialisierung.
============================================================ */ ============================================================ */
const APP_VER = '547'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VER = '548'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VERSION = '1.1.4'; // ← semantische Version, wird bei make release gesetzt const APP_VERSION = '1.1.4'; // ← semantische Version, wird bei make release gesetzt
const IS_STAGING = location.hostname === 'staging.banyaro.app'; const IS_STAGING = location.hostname === 'staging.banyaro.app';
@ -802,7 +802,8 @@ const App = (() => {
}); });
} }
const startPage = (hashPage && pages[hashPage]) ? hashPage : 'welcome'; const startPage = (hashPage && pages[hashPage]) ? hashPage : 'welcome';
navigate(startPage, false, hashParams); // Nicht eingeloggte User immer zur Welcome-Seite — auch bei direktem Link auf Forum, Map etc.
navigate(state.user ? startPage : 'welcome', false, hashParams);
} }
async function _handleInvite(token) { async function _handleInvite(token) {

View file

@ -3,7 +3,7 @@
Offline-Cache + Push Notifications + Tile-Cache Offline-Cache + Push Notifications + Tile-Cache
============================================================ */ ============================================================ */
const CACHE_VERSION = 'by-v570'; const CACHE_VERSION = 'by-v571';
const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_STATIC = `${CACHE_VERSION}-static`;
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache