From 8d2cc279ae363e515741a4e587847b314c24dfe4 Mon Sep 17 00:00:00 2001 From: rene Date: Sat, 30 May 2026 18:00:14 +0200 Subject: [PATCH] Navigation: worlds-back-Pfeil sichtbar bei Page-zu-Page-Sprung MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bisher: App.navigate() rief nur dann Worlds.hide() (und damit worlds-back-visible) wenn Worlds gerade sichtbar war. Wer aus dem Onboarding direkt nach #dog-profile navigiert (kein vorheriges Worlds-Anzeigen) hatte keinen Zurück-Pfeil zu den Welten + FAB — saß auf dem Profil fest. Fix: in navigate() unabhängig vom Worlds-State die Klasse worlds-back-visible setzen, sobald ein eingeloggter User auf einer nicht-welcome/onboarding-Seite ist. Bump 1136→1137. --- VERSION | 2 +- backend/static/index.html | 24 ++++++++++++------------ backend/static/js/app.js | 15 ++++++++++++++- backend/static/landing.html | 2 +- backend/static/sw.js | 2 +- 5 files changed, 29 insertions(+), 16 deletions(-) diff --git a/VERSION b/VERSION index 5f798c1..e74e6cd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1136 \ No newline at end of file +1137 \ No newline at end of file diff --git a/backend/static/index.html b/backend/static/index.html index f5f69f4..10be67b 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -86,14 +86,14 @@ Ban Yaro - + - - - - - + + + + + @@ -617,11 +617,11 @@ - - - - - + + + + + @@ -631,7 +631,7 @@ - + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 2927c34..3b23e54 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 = '1136'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '1137'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.6.0'; // ← semantische Version, wird bei make release gesetzt window.APP_VER = APP_VER; // global verfügbar für andere Module (z.B. offline-indicator) window.APP_VERSION = APP_VERSION; @@ -148,6 +148,19 @@ const App = (() => { // Modal offen oder Cooldown → bei nächstem Seitenwechsel versuchen } if (window.Worlds?._visible) window.Worlds.hide(); + // Worlds-Zurück-Pfeil sichtbar machen, sobald ein Logged-In-User auf + // einer „echten" Seite landet (auch bei Page-zu-Page-Sprung ohne vorigen + // Worlds-Aufruf, z.B. Onboarding→dog-profile). Sonst kein Weg zurück + // zu Welten + FAB. Für welcome/onboarding ausblenden. + const _hideBackFor = new Set(['welcome', 'onboarding']); + const _backEl = document.getElementById('worlds-back'); + if (_backEl) { + if (state.user && !_hideBackFor.has(pageId)) { + _backEl.classList.add('worlds-back-visible'); + } else { + _backEl.classList.remove('worlds-back-visible'); + } + } // destroy() der aktuellen Seite aufrufen (z.B. FABs aufräumen) const activePage = document.querySelector('.page.active'); diff --git a/backend/static/landing.html b/backend/static/landing.html index 6134b9f..fad26ff 100644 --- a/backend/static/landing.html +++ b/backend/static/landing.html @@ -4,7 +4,7 @@ - + Ban Yaro — Die Hunde-App für Deutschland, Österreich & Schweiz diff --git a/backend/static/sw.js b/backend/static/sw.js index c0f53f5..9395c59 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -4,7 +4,7 @@ ============================================================ */ // ← EINZIGE Stelle für die Version — STATIC_ASSETS und CACHE_VERSION leiten sich ab -const VER = '1136'; +const VER = '1137'; const CACHE_VERSION = `by-v${VER}`; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten