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.
|
||||
============================================================ */
|
||||
|
||||
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 IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ const App = (() => {
|
|||
poison: { title: 'Giftköder-Alarm', module: null },
|
||||
walks: { title: 'Gassi-Treffen', 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 },
|
||||
knigge: { title: 'Knigge', module: null },
|
||||
movies: { title: 'Filme', module: null },
|
||||
|
|
@ -124,10 +124,9 @@ const App = (() => {
|
|||
async function _loadPage(pageId, params = {}) {
|
||||
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) {
|
||||
const container = document.querySelector(`#page-${pageId} .page-body`);
|
||||
if (container) _renderLoginGate(container, pageId);
|
||||
navigate('welcome', false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue