From 0ab88ef6b6f8d85a7cc778259dfb8cd81498ced7 Mon Sep 17 00:00:00 2001 From: rene Date: Tue, 12 May 2026 06:31:22 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Tagebuch-Foto=20bei=20neuem=20Eintrag=20?= =?UTF-8?q?=E2=80=94=20GPS-Fetch=20bei=20anh=C3=A4ngigen=20Dateien=20?= =?UTF-8?q?=C3=BCberspringen=20(SW=20by-v875)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/main.py | 2 +- backend/static/index.html | 14 +++++++------- backend/static/js/app.js | 2 +- backend/static/js/pages/diary.js | 6 ++++-- backend/static/sw.js | 2 +- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/backend/main.py b/backend/main.py index 5c9ff53..ea20480 100644 --- a/backend/main.py +++ b/backend/main.py @@ -376,7 +376,7 @@ if STAGING and os.path.isdir(PROD_MEDIA_DIR): else: app.mount("/media", StaticFiles(directory=MEDIA_DIR), name="media") -APP_VER = "874" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "875" # 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 c41d071..bf40581 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 70eaf72..887f785 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 = '874'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '875'; // ← 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/diary.js b/backend/static/js/pages/diary.js index 42e0b5d..f04bf67 100644 --- a/backend/static/js/pages/diary.js +++ b/backend/static/js/pages/diary.js @@ -1678,9 +1678,11 @@ window.Page_diary = (() => { }); await UI.asyncButton(submitBtn, async () => { - // Auto-Wetter: nur bei neuem Eintrag ohne GPS-Standort + // Auto-Wetter: nur bei neuem Eintrag ohne GPS-Standort und OHNE anhängige Dateien. + // Wenn Dateien hochzuladen sind, dürfen wir keinen langen await vor dem Upload machen — + // iOS macht File-Handles nach längerer Pause ungültig (WebKit-Bug). let _clientWeather = null; - if (!isEdit && _locLat == null) { + if (!isEdit && _locLat == null && _newFiles.length === 0) { try { const pos = await API.getLocation(); const wd = await API.weather.get(pos.lat, pos.lon); diff --git a/backend/static/sw.js b/backend/static/sw.js index 333b731..797d5b7 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-v874'; +const CACHE_VERSION = 'by-v875'; 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