Fix: Settings lädt frischen /me-State beim Init — Badges immer aktuell ohne Re-Login, SW by-v556

This commit is contained in:
rene 2026-04-30 15:18:02 +02:00
parent 125fb3c7e7
commit f31f219ad6
3 changed files with 10 additions and 2 deletions

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '532'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '533'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VERSION = '1.1.1'; // ← semantische Version, wird bei make release gesetzt
const IS_STAGING = location.hostname === 'staging.banyaro.app';

View file

@ -54,6 +54,14 @@ window.Page_settings = (() => {
_container = container;
_appState = appState;
_render();
// Frischen User-State laden damit Badges (is_founder, is_partner) aktuell sind
if (_appState.user) {
try {
const fresh = await API.auth.me();
Object.assign(_appState.user, fresh);
_render();
} catch {}
}
}
function refresh() {

View file

@ -3,7 +3,7 @@
Offline-Cache + Push Notifications + Tile-Cache
============================================================ */
const CACHE_VERSION = 'by-v555';
const CACHE_VERSION = 'by-v556';
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