diff --git a/backend/main.py b/backend/main.py index 4867fc0..f812da7 100644 --- a/backend/main.py +++ b/backend/main.py @@ -327,7 +327,7 @@ MEDIA_DIR = os.getenv("MEDIA_DIR", "/data/media") os.makedirs(MEDIA_DIR, exist_ok=True) app.mount("/media", StaticFiles(directory=MEDIA_DIR), name="media") -APP_VER = "750" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "751" # muss mit APP_VER in app.js übereinstimmen @app.get("/api/version") async def app_version(): diff --git a/backend/static/index.html b/backend/static/index.html index 196e18b..2602fbd 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -578,7 +578,7 @@ - + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index bd6ab66..f9b7eeb 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 = '750'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '751'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.5.0'; // ← semantische Version, wird bei make release gesetzt const IS_STAGING = location.hostname === 'staging.banyaro.app'; diff --git a/backend/static/js/worlds.js b/backend/static/js/worlds.js index 49d0608..15b3074 100644 --- a/backend/static/js/worlds.js +++ b/backend/static/js/worlds.js @@ -267,7 +267,6 @@ window.Worlds = (() => { function _openFab() { const options = _fabOptions(); - if (!options.length) return; const meldenPages = new Set(['poison','lost','recalls','map']); const meldenCount = options.filter(o => meldenPages.has(o.page)).length; @@ -282,7 +281,7 @@ window.Worlds = (() => { padding:20px 16px calc(env(safe-area-inset-bottom,16px) + 16px); box-shadow:0 -8px 32px rgba(0,0,0,0.2)">
-
${title}
+
${options.length ? title : 'Schnellzugriff'}
`).join('')}
+ `; @@ -316,6 +321,7 @@ window.Worlds = (() => { const _close = () => ov.remove(); ov.querySelector('#fab-backdrop').addEventListener('click', _close); ov.querySelector('#fab-close').addEventListener('click', _close); + ov.querySelector('#fab-all-btn').addEventListener('click', () => { _close(); _openAllChips(); }); ov.querySelectorAll('.fab-option').forEach(btn => { btn.addEventListener('click', () => { _close(); @@ -333,6 +339,68 @@ window.Worlds = (() => { }); } + function _openAllChips() { + const worldNames = ['jetzt', 'hund', 'welt']; + const worldLabels = { jetzt: 'JETZT', hund: 'HUND', welt: 'WELT' }; + + const sections = worldNames.map(w => { + const chips = (_DEFAULT_CONFIG[w] || []).map(_chipMeta).filter(c => c && _chipAllowed(c)); + if (!chips.length) return ''; + return ` +
+
${worldLabels[w]}
+
+ ${chips.map(c => ` + + `).join('')} +
+
+ `; + }).join(''); + + const ov = document.createElement('div'); + ov.id = 'fab-overlay'; + ov.style.cssText = 'position:fixed;inset:0;z-index:460;display:flex;flex-direction:column;justify-content:flex-end'; + ov.innerHTML = ` +
+
+
+
Alle Funktionen
+ +
+ ${sections} +
+ `; + + document.body.appendChild(ov); + + const _close = () => ov.remove(); + ov.querySelector('#fab-backdrop').addEventListener('click', _close); + ov.querySelector('#fab-close').addEventListener('click', _close); + ov.querySelectorAll('.all-chip-btn').forEach(btn => { + btn.addEventListener('click', () => { + _close(); + navigateTo(btn.dataset.page); + }); + }); + } + // ── SCHNELL-GASSI ───────────────────────────────────────────── async function _openQuickGassi() { diff --git a/backend/static/sw.js b/backend/static/sw.js index ba4fbbf..70b9a03 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-v750'; +const CACHE_VERSION = 'by-v751'; 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