Fix: Altes Hundeprofil-Foto wird beim Überschreiben gelöscht (SW by-v930)
- dogs.py /photo: alte foto_url vor Upload merken, nach Speichern von Disk löschen - dog-profile.js: Hintergrund-Cache nach Foto-Wechsel invalidieren
This commit is contained in:
parent
3585958c47
commit
567478a866
5 changed files with 19 additions and 5 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '929'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '930'; // ← 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
|
||||
|
|
|
|||
|
|
@ -1380,6 +1380,10 @@ window.Page_dog_profile = (() => {
|
|||
saved.foto_url = result.foto_url;
|
||||
_appState.activeDog = { ...saved };
|
||||
_appState.dogs = _appState.dogs.map(d => d.id === saved.id ? _appState.activeDog : d);
|
||||
// Hintergrund-Cache invalidieren damit Welten das neue Foto zeigen
|
||||
const userId = _appState.user?.id || 'anon';
|
||||
const todayKey = `w3_bg3_${userId}_` + new Date().toISOString().slice(0, 10);
|
||||
localStorage.removeItem(todayKey);
|
||||
} catch {
|
||||
UI.toast.warning('Profil gespeichert, Foto konnte nicht hochgeladen werden.');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Offline-Cache + Push Notifications + Tile-Cache
|
||||
============================================================ */
|
||||
|
||||
const CACHE_VERSION = 'by-v929';
|
||||
const CACHE_VERSION = 'by-v930';
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue