Navigation: worlds-back-Pfeil sichtbar bei Page-zu-Page-Sprung
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.
This commit is contained in:
parent
bd9acda084
commit
8d2cc279ae
5 changed files with 29 additions and 16 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue