From 7fb4177dbd6a895ad5c68625316437f9975bb09b Mon Sep 17 00:00:00 2001 From: rene Date: Wed, 13 May 2026 19:40:21 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Breeder-FAB=20an=20document.body=20?= =?UTF-8?q?=E2=80=94=20verschwindet=20zuverl=C3=A4ssig=20via=20destroy()?= =?UTF-8?q?=20(SW=20by-v908)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/main.py | 2 +- backend/static/index.html | 8 ++++---- backend/static/js/app.js | 2 +- backend/static/js/pages/breeder.js | 30 +++++++++++++++--------------- backend/static/sw.js | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/backend/main.py b/backend/main.py index c3c8728..e37b793 100644 --- a/backend/main.py +++ b/backend/main.py @@ -406,7 +406,7 @@ async def serve_media(path: str, request: _Request): raise _HE(404, "Nicht gefunden.") return _media_response(filepath) -APP_VER = "907" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "908" # muss mit APP_VER in app.js übereinstimmen @app.get("/.well-known/assetlinks.json") async def assetlinks(): diff --git a/backend/static/index.html b/backend/static/index.html index 3d73a3b..cc1f098 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -591,10 +591,10 @@ - - - - + + + + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index a8c359b..e3e08be 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 = '907'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '908'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.5.1'; // ← semantische Version, wird bei make release gesetzt const IS_STAGING = location.hostname === 'staging.banyaro.app'; // Cache-Bust-Parameter nach Update-Reload sofort entfernen diff --git a/backend/static/js/pages/breeder.js b/backend/static/js/pages/breeder.js index 705d484..58edb3d 100644 --- a/backend/static/js/pages/breeder.js +++ b/backend/static/js/pages/breeder.js @@ -28,22 +28,22 @@ window.Page_breeder = (() => { container.innerHTML = `
${UI.skeleton(5)} -
- `; + `; - document.getElementById('breeder-back-fab') - ?.addEventListener('click', () => App.navigate('wurfboerse')); + // FAB an document.body hängen damit position:fixed zuverlässig funktioniert + // und destroy() der einzige Lifecycle-Kontrollpunkt bleibt + const fab = document.createElement('button'); + fab.id = 'breeder-back-fab'; + fab.setAttribute('aria-label', 'Zurück zur Wurfbörse'); + fab.style.cssText = 'position:fixed;bottom:calc(var(--safe-bottom,0px) + 20px);right:20px;' + + 'width:54px;height:54px;border-radius:50%;background:var(--c-primary);' + + 'border:none;color:#fff;cursor:pointer;z-index:200;' + + 'display:flex;align-items:center;justify-content:center;' + + 'box-shadow:0 4px 18px rgba(196,132,58,.45);transition:transform .12s,box-shadow .12s;' + + '-webkit-tap-highlight-color:transparent'; + fab.innerHTML = ''; + fab.addEventListener('click', () => App.navigate('wurfboerse')); + document.body.appendChild(fab); try { const p = await API.breeder.profile(zwingername); diff --git a/backend/static/sw.js b/backend/static/sw.js index 0ececf1..eea0518 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-v907'; +const CACHE_VERSION = 'by-v908'; 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