From 5927d384bfb6a63312b01e95653ec1fe5569cea0 Mon Sep 17 00:00:00 2001 From: rene Date: Fri, 17 Apr 2026 23:09:42 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Nav-Avatar=20mit=20Zoom/Offset,=20render?= =?UTF-8?q?DogSwitcher=20nach=20Foto-=C3=84nderung,=20Button-Padding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/static/js/app.js | 5 +++-- backend/static/js/pages/dog-profile.js | 5 ++++- backend/static/sw.js | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/static/js/app.js b/backend/static/js/app.js index a605ad9..30ca8e6 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 = '122'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '123'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const App = (() => { @@ -477,7 +477,8 @@ const App = (() => { } const avHtml = d => d.foto_url - ? `${UI.escape(d.name)}` + ? `${UI.escape(d.name)}` : `🐕`; // Inaktive Hunde rechts diff --git a/backend/static/js/pages/dog-profile.js b/backend/static/js/pages/dog-profile.js index 29eabfc..397ba6e 100644 --- a/backend/static/js/pages/dog-profile.js +++ b/backend/static/js/pages/dog-profile.js @@ -77,7 +77,7 @@ window.Page_dog_profile = (() => {
-
+
${dog.foto_url ? `
${_esc(dog.name)} { UI.modal.close(); UI.toast.success('Position gespeichert.'); _renderProfile(_appState.activeDog); + App.renderDogSwitcher(); } catch (err) { UI.toast.error(err.message || 'Fehler beim Speichern.'); } @@ -372,6 +373,7 @@ window.Page_dog_profile = (() => { UI.modal.close(); UI.toast.success('Foto gelöscht.'); _renderProfile(_appState.activeDog); + App.renderDogSwitcher(); } catch (err) { UI.toast.error(err.message || 'Fehler beim Löschen.'); } @@ -390,6 +392,7 @@ window.Page_dog_profile = (() => { _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); UI.modal.close(); + App.renderDogSwitcher(); 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 4c0cf89..3501386 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-v149'; +const CACHE_VERSION = 'by-v150'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten