Fix: Nav-Avatar mit Zoom/Offset, renderDogSwitcher nach Foto-Änderung, Button-Padding
This commit is contained in:
parent
4f12c8e6a4
commit
5927d384bf
3 changed files with 8 additions and 4 deletions
|
|
@ -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
|
||||
? `<img src="${UI.escape(d.foto_url)}" alt="${UI.escape(d.name)}">`
|
||||
? `<img src="${UI.escape(d.foto_url)}" alt="${UI.escape(d.name)}"
|
||||
style="transform:scale(${d.foto_zoom||1}) translate(${d.foto_offset_x||0}%,${d.foto_offset_y||0}%)">`
|
||||
: `<span>🐕</span>`;
|
||||
|
||||
// Inaktive Hunde rechts
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ window.Page_dog_profile = (() => {
|
|||
<div style="text-align:center;padding:var(--space-6) var(--space-2) var(--space-4)">
|
||||
|
||||
<!-- Profilfoto mit Upload-Button -->
|
||||
<div style="position:relative;display:inline-block;margin-bottom:var(--space-4)">
|
||||
<div style="position:relative;display:inline-block;margin-bottom:var(--space-4);padding:4px">
|
||||
${dog.foto_url
|
||||
? `<div class="dp-avatar-ring">
|
||||
<img src="${dog.foto_url}" alt="${_esc(dog.name)}" class="dp-avatar-img"
|
||||
|
|
@ -357,6 +357,7 @@ window.Page_dog_profile = (() => {
|
|||
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue