From a16f0268cc1c06abc4b271de267b3b9dc44e5085 Mon Sep 17 00:00:00 2001 From: rene Date: Thu, 30 Apr 2026 19:30:28 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Nicht-eingeloggte=20User=20werden=20bei?= =?UTF-8?q?=20gesch=C3=BCtzten=20Seiten=20zu=20Welcome=20umgeleitet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Forum erhält requiresAuth, Auth-Guard navigiert zu Welcome statt Inline-Gate. SW by-v572, APP_VER 549 --- backend/static/js/app.js | 9 ++++----- backend/static/sw.js | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/backend/static/js/app.js b/backend/static/js/app.js index bc671d7..4c58e2d 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -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; } diff --git a/backend/static/sw.js b/backend/static/sw.js index 2b792d5..92fa1d6 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -3,7 +3,7 @@ Offline-Cache + Push Notifications + Tile-Cache ============================================================ */ -const CACHE_VERSION = 'by-v571'; +const CACHE_VERSION = 'by-v572'; 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