diff --git a/backend/main.py b/backend/main.py index 997d908..45826e0 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 = "885" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "883" # muss mit APP_VER in app.js übereinstimmen @app.get("/.well-known/assetlinks.json") async def assetlinks(): diff --git a/backend/static/css/components.css b/backend/static/css/components.css index 0a6c754..325fc8b 100644 --- a/backend/static/css/components.css +++ b/backend/static/css/components.css @@ -3563,7 +3563,7 @@ html.modal-open { padding-top: 52px; position: relative; } - /* Liste: feste Breite links, scrollbar unsichtbar */ + /* Liste: feste Breite links, scrollbar */ #walks-list-view { display: block !important; width: 380px; @@ -3571,10 +3571,6 @@ html.modal-open { flex-shrink: 0; border-right: 1px solid var(--c-border); overflow-y: auto; - scrollbar-width: none; /* Firefox */ - } - #walks-list-view::-webkit-scrollbar { - display: none; /* Chrome / Safari / macOS */ } /* Karte: Rest des Platzes, sticky */ #walks-map-view { diff --git a/backend/static/index.html b/backend/static/index.html index cc215cf..6413439 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -101,9 +101,9 @@ - - - + + +
@@ -583,10 +583,10 @@ - - - - + + + + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 9c1a424..95691e8 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 = '885'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '883'; // ← 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/map.js b/backend/static/js/pages/map.js index 4cce79c..dda7473 100644 --- a/backend/static/js/pages/map.js +++ b/backend/static/js/pages/map.js @@ -1582,14 +1582,10 @@ window.Page_map = (() => { } async function _acquireWakeLock() { - if (!('wakeLock' in navigator) || _wakeLock) return; + if (!('wakeLock' in navigator)) return; try { _wakeLock = await navigator.wakeLock.request('screen'); - _wakeLock.addEventListener('release', () => { - _wakeLock = null; - // OS hat Lock entzogen → sofort neu anfordern wenn noch aufzeichnet - if (_recActive) _acquireWakeLock(); - }); + _wakeLock.addEventListener('release', () => { _wakeLock = null; }); } catch {} } diff --git a/backend/static/js/pages/routes.js b/backend/static/js/pages/routes.js index 21e5d6e..a085587 100644 --- a/backend/static/js/pages/routes.js +++ b/backend/static/js/pages/routes.js @@ -763,8 +763,7 @@ window.Page_routes = (() => { _recPolyline = L.polyline([], { color: '#ef4444', weight: 5, opacity: 0.9 }).addTo(_recMap); - await _recAcquireWakeLock(); - document.addEventListener('visibilitychange', _recOnVisibility); + navigator.wakeLock?.request('screen').then(wl => { _recWakeLock = wl; }).catch(() => {}); _recWatchId = navigator.geolocation.watchPosition(pos => { const lat = pos.coords.latitude, lon = pos.coords.longitude; @@ -853,24 +852,6 @@ window.Page_routes = (() => { }, 5000); } - async function _recAcquireWakeLock() { - if (!('wakeLock' in navigator) || _recWakeLock) return; - try { - _recWakeLock = await navigator.wakeLock.request('screen'); - _recWakeLock.addEventListener('release', () => { - _recWakeLock = null; - // OS hat Lock entzogen (Anruf, Tab-Wechsel etc.) → sofort neu anfordern - if (_recActive) _recAcquireWakeLock(); - }); - } catch {} - } - - function _recOnVisibility() { - if (_recActive && document.visibilityState === 'visible' && !_recWakeLock) { - _recAcquireWakeLock(); - } - } - async function _stopRecInOvl(save) { if (!_recActive && save) return; _recActive = false; @@ -878,7 +859,6 @@ window.Page_routes = (() => { if (_recTimerInt) { clearInterval(_recTimerInt); _recTimerInt = null; } if (_recInactTimer){ clearTimeout(_recInactTimer); _recInactTimer = null; } if (_recWakeLock) { try { await _recWakeLock.release(); } catch {} _recWakeLock = null; } - document.removeEventListener('visibilitychange', _recOnVisibility); _recOvl?.removeEventListener('touchstart', _onRecOvlTouch); _recOvl?.removeEventListener('pointerdown', _onRecOvlTouch); @@ -1726,8 +1706,7 @@ window.Page_routes = (() => { }; // GPS-Watch - await _navAcquireWakeLock(); - document.addEventListener('visibilitychange', _navOnVisibility); + navigator.wakeLock?.request('screen').then(wl => { _navWakeLock = wl; }).catch(() => {}); let _navFirstFix = true; _navWatchId = navigator.geolocation.watchPosition(pos => { const { latitude: lat, longitude: lon } = pos.coords; @@ -1873,28 +1852,10 @@ window.Page_routes = (() => { }, 10000); } - async function _navAcquireWakeLock() { - if (!('wakeLock' in navigator) || _navWakeLock) return; - try { - _navWakeLock = await navigator.wakeLock.request('screen'); - _navWakeLock.addEventListener('release', () => { - _navWakeLock = null; - if (_navWatchId !== null) _navAcquireWakeLock(); - }); - } catch {} - } - - function _navOnVisibility() { - if (_navWatchId !== null && document.visibilityState === 'visible' && !_navWakeLock) { - _navAcquireWakeLock(); - } - } - function _closeNav() { if (_navWatchId !== null) { navigator.geolocation.clearWatch(_navWatchId); _navWatchId = null; } if (_navInactTimer) { clearTimeout(_navInactTimer); _navInactTimer = null; } if (_navWakeLock) { try { _navWakeLock.release(); } catch {} _navWakeLock = null; } - document.removeEventListener('visibilitychange', _navOnVisibility); if (_navWalkMeta && _navWalkMeta.trackLen > 1) { const pct = Math.round(_navMaxIdx / (_navWalkMeta.trackLen - 1) * 100); if (pct >= 50) { diff --git a/backend/static/sw.js b/backend/static/sw.js index 4bb5047..c6d2171 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-v885'; +const CACHE_VERSION = 'by-v883'; 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