Fix: Nicht-eingeloggte User werden bei geschützten Seiten zu Welcome umgeleitet
Forum erhält requiresAuth, Auth-Guard navigiert zu Welcome statt Inline-Gate. SW by-v572, APP_VER 549
This commit is contained in:
parent
87aeed8de8
commit
a16f0268cc
2 changed files with 5 additions and 6 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
Router, State-Management, Navigation, Initialisierung.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const APP_VER = '548'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
const APP_VER = '549'; // ← 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';
|
||||||
|
|
||||||
|
|
@ -45,7 +45,7 @@ const App = (() => {
|
||||||
poison: { title: 'Giftköder-Alarm', module: null },
|
poison: { title: 'Giftköder-Alarm', module: null },
|
||||||
walks: { title: 'Gassi-Treffen', module: null, requiresAuth: true },
|
walks: { title: 'Gassi-Treffen', module: null, requiresAuth: true },
|
||||||
sitting: { title: 'Sitting', module: null, requiresAuth: true },
|
sitting: { title: 'Sitting', module: null, requiresAuth: true },
|
||||||
forum: { title: 'Forum', module: null },
|
forum: { title: 'Forum', module: null, requiresAuth: true },
|
||||||
wiki: { title: 'Wiki', module: null },
|
wiki: { title: 'Wiki', module: null },
|
||||||
knigge: { title: 'Knigge', module: null },
|
knigge: { title: 'Knigge', module: null },
|
||||||
movies: { title: 'Filme', module: null },
|
movies: { title: 'Filme', module: null },
|
||||||
|
|
@ -124,10 +124,9 @@ const App = (() => {
|
||||||
async function _loadPage(pageId, params = {}) {
|
async function _loadPage(pageId, params = {}) {
|
||||||
const page = pages[pageId];
|
const page = pages[pageId];
|
||||||
|
|
||||||
// AUTH GUARD — geschützte Seiten für nicht-eingeloggte User
|
// AUTH GUARD — geschützte Seiten für nicht-eingeloggte User → Welcome
|
||||||
if (page.requiresAuth && !state.user) {
|
if (page.requiresAuth && !state.user) {
|
||||||
const container = document.querySelector(`#page-${pageId} .page-body`);
|
navigate('welcome', false);
|
||||||
if (container) _renderLoginGate(container, pageId);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications + Tile-Cache
|
Offline-Cache + Push Notifications + Tile-Cache
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v571';
|
const CACHE_VERSION = 'by-v572';
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue