Fix: Datenschutz Hintergrundbild + Dog-Refresh nach Anlegen (SW by-v928)
- dogs.py: welcome-dashboard Foto-Queries filtern jetzt auch nach user_id - worlds.js: Background Cache-Key enthält user_id (kein Cross-User Leakage) - worlds.js: Worlds.refresh(appState) neu - dog-profile.js: Worlds.refresh() nach Hund anlegen aufrufen
This commit is contained in:
parent
2a3afa0604
commit
00457f52f9
6 changed files with 25 additions and 9 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '927'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '928'; // ← 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
|
||||
|
|
|
|||
|
|
@ -1388,6 +1388,9 @@ window.Page_dog_profile = (() => {
|
|||
// Dog Switcher in Header + Sidebar aktualisieren
|
||||
App.renderDogSwitcher?.();
|
||||
|
||||
// Welten neu laden damit HUND-Welt den neuen Hund zeigt
|
||||
window.Worlds?.refresh(_appState);
|
||||
|
||||
await _render();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -924,7 +924,8 @@ window.Worlds = (() => {
|
|||
|
||||
async function _loadDailyImage(dog) {
|
||||
if (!dog) return null;
|
||||
const todayKey = 'bg3_' + new Date().toISOString().slice(0, 10);
|
||||
const userId = _state?.user?.id || 'anon';
|
||||
const todayKey = `bg3_${userId}_` + new Date().toISOString().slice(0, 10);
|
||||
const cached = _wLoad(todayKey);
|
||||
if (cached?.data) return cached.data;
|
||||
try {
|
||||
|
|
@ -1689,6 +1690,17 @@ window.Worlds = (() => {
|
|||
return String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"');
|
||||
}
|
||||
|
||||
return { init, show, hide, navigateTo, openConfig: _openConfigModal, get _visible() { return _visible; } };
|
||||
function refresh(appState) {
|
||||
if (appState) _state = appState;
|
||||
localStorage.removeItem('w3_dogs');
|
||||
_bgUrl = null;
|
||||
if (_visible) {
|
||||
if (_cur === 0) _renderJetzt();
|
||||
else if (_cur === 1) _renderHund();
|
||||
else _renderWelt();
|
||||
}
|
||||
}
|
||||
|
||||
return { init, show, hide, navigateTo, refresh, openConfig: _openConfigModal, get _visible() { return _visible; } };
|
||||
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue