Feature: Welten Info-Cards — User-Avatar in JETZT, Hunde-Avatar+Cycle+Overlap in HUND, SW by-v639
This commit is contained in:
parent
dfd68f2a07
commit
fc2002847c
4 changed files with 1074 additions and 6 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '607'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '639'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VERSION = '1.2.1'; // ← semantische Version, wird bei make release gesetzt
|
||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||
|
||||
|
|
@ -75,6 +75,7 @@ const App = (() => {
|
|||
recalls: { title: 'Rückrufe', module: null },
|
||||
adoption: { title: 'Adoption', module: null },
|
||||
playdate: { title: 'Playdate', module: null, requiresAuth: true },
|
||||
wetter: { title: 'Wetter', module: null },
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
|
@ -98,6 +99,7 @@ const App = (() => {
|
|||
// ----------------------------------------------------------
|
||||
function navigate(pageId, pushHistory = true, params = {}) {
|
||||
if (!pages[pageId]) return;
|
||||
if (window.Worlds?._visible) window.Worlds.hide();
|
||||
|
||||
// Aktive Seite ausblenden
|
||||
document.querySelector('.page.active')?.classList.remove('active');
|
||||
|
|
@ -852,6 +854,9 @@ const App = (() => {
|
|||
const startPage = (hashPage && pages[hashPage]) ? hashPage : 'welcome';
|
||||
// Nicht eingeloggte User immer zur Welcome-Seite — auch bei direktem Link auf Forum, Map etc.
|
||||
navigate(state.user ? startPage : 'welcome', false, hashParams);
|
||||
|
||||
// Drei Welten nach initialer Navigation starten (damit hide() in navigate() sie nicht gleich killt)
|
||||
if (window.Worlds) window.Worlds.init(state);
|
||||
}
|
||||
|
||||
async function _handleInvite(token) {
|
||||
|
|
@ -925,6 +930,8 @@ const App = (() => {
|
|||
|
||||
})();
|
||||
|
||||
window.App = App; // Worlds kann App.navigate() aufrufen
|
||||
|
||||
// App starten
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
App.init();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue