From aa379d8e08fab364204abcdb9e29544a28563c3c Mon Sep 17 00:00:00 2001 From: rene Date: Thu, 14 May 2026 12:11:59 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Foto-Upload=20=E2=86=92=20sofortiger=20R?= =?UTF-8?q?efresh=20von=20Profil=20+=20DogSwitcher=20+=20Welten=20(SW=20by?= =?UTF-8?q?-v934)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/main.py | 2 +- backend/static/js/app.js | 2 +- backend/static/js/pages/dog-profile.js | 6 +++++- backend/static/sw.js | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/main.py b/backend/main.py index aa1c4f9..6c172d0 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 = "933" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "934" # muss mit APP_VER in app.js übereinstimmen @app.get("/.well-known/assetlinks.json") async def assetlinks(): diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 44d530e..64c0adb 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 = '933'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '934'; // ← 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/dog-profile.js b/backend/static/js/pages/dog-profile.js index e8b35f2..2d4c843 100644 --- a/backend/static/js/pages/dog-profile.js +++ b/backend/static/js/pages/dog-profile.js @@ -769,8 +769,12 @@ window.Page_dog_profile = (() => { await API.dogs.updatePhotoPosition(dog.id, 1.0, 0.0, 0.0); _appState.activeDog = { ..._appState.activeDog, foto_url: result.foto_url, foto_zoom: 1, foto_offset_x: 0, foto_offset_y: 0 }; _appState.dogs = _appState.dogs.map(d => d.id === dog.id ? _appState.activeDog : d); + // Hintergrund-Cache invalidieren + const userId2 = _appState.user?.id || 'anon'; + localStorage.removeItem(`w3_bg3_${userId2}_` + new Date().toISOString().slice(0, 10)); UI.modal.close(); - App.renderDogSwitcher(); + App.renderDogSwitcher?.(); + window.Worlds?.refresh(_appState); UI.toast.success('Foto hochgeladen.'); _renderProfile(_appState.activeDog); // Editor neu öffnen damit User positionieren kann diff --git a/backend/static/sw.js b/backend/static/sw.js index 6400ec7..a2733ff 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-v933'; +const CACHE_VERSION = 'by-v934'; 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