Fix: Tier-Wechsel auf eigenen Account → sofortiges Worlds-Re-render ohne Reload (SW by-v739)
This commit is contained in:
parent
c027573e10
commit
e3d3802829
5 changed files with 14 additions and 5 deletions
|
|
@ -578,7 +578,7 @@
|
|||
<script src="/js/api.js?v=94"></script>
|
||||
<script src="/js/ui.js?v=94"></script>
|
||||
<script src="/js/app.js?v=94"></script>
|
||||
<script src="/js/worlds.js?v=738"></script>
|
||||
<script src="/js/worlds.js?v=739"></script>
|
||||
|
||||
<!-- Feature-Seiten werden lazy geladen -->
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '738'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '739'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VERSION = '1.4.0'; // ← semantische Version, wird bei make release gesetzt
|
||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||
|
||||
|
|
|
|||
|
|
@ -946,7 +946,16 @@ window.Page_admin = (() => {
|
|||
UI.modal.close();
|
||||
try {
|
||||
await API.patch(`/admin/users/${uid}`, { subscription_tier: btn.dataset.tier });
|
||||
UI.toast.success(`${name}: Abo-Stufe ist jetzt ${btn.dataset.tier}.`);
|
||||
// Eigenes Tier geändert → User-State neu laden + Welten neu rendern
|
||||
if (String(uid) === String(_appState?.user?.id)) {
|
||||
_appState.user.subscription_tier = btn.dataset.tier;
|
||||
if (window.Worlds) {
|
||||
window.Worlds.init(_appState);
|
||||
}
|
||||
UI.toast.success(`Dein Tier ist jetzt ${btn.dataset.tier} — Ansicht aktualisiert.`);
|
||||
} else {
|
||||
UI.toast.success(`${name}: Abo-Stufe ist jetzt ${btn.dataset.tier}.`);
|
||||
}
|
||||
_renderTab();
|
||||
} catch (e) { UI.toast.error(e.message); }
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Offline-Cache + Push Notifications + Tile-Cache
|
||||
============================================================ */
|
||||
|
||||
const CACHE_VERSION = 'by-v738';
|
||||
const CACHE_VERSION = 'by-v739';
|
||||
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