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
|
|
@ -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