Fix: Rolle-gebundene Chips (Admin/Mod/Social) immer sichtbar unabhängig von persönlicher Config (SW by-v742)
This commit is contained in:
parent
ed9c482ae5
commit
4a4e98ea6f
5 changed files with 16 additions and 5 deletions
|
|
@ -327,7 +327,7 @@ MEDIA_DIR = os.getenv("MEDIA_DIR", "/data/media")
|
||||||
os.makedirs(MEDIA_DIR, exist_ok=True)
|
os.makedirs(MEDIA_DIR, exist_ok=True)
|
||||||
app.mount("/media", StaticFiles(directory=MEDIA_DIR), name="media")
|
app.mount("/media", StaticFiles(directory=MEDIA_DIR), name="media")
|
||||||
|
|
||||||
APP_VER = "741" # muss mit APP_VER in app.js übereinstimmen
|
APP_VER = "742" # muss mit APP_VER in app.js übereinstimmen
|
||||||
|
|
||||||
@app.get("/api/version")
|
@app.get("/api/version")
|
||||||
async def app_version():
|
async def app_version():
|
||||||
|
|
|
||||||
|
|
@ -578,7 +578,7 @@
|
||||||
<script src="/js/api.js?v=94"></script>
|
<script src="/js/api.js?v=94"></script>
|
||||||
<script src="/js/ui.js?v=94"></script>
|
<script src="/js/ui.js?v=94"></script>
|
||||||
<script src="/js/app.js?v=94"></script>
|
<script src="/js/app.js?v=94"></script>
|
||||||
<script src="/js/worlds.js?v=741"></script>
|
<script src="/js/worlds.js?v=742"></script>
|
||||||
|
|
||||||
<!-- Feature-Seiten werden lazy geladen -->
|
<!-- Feature-Seiten werden lazy geladen -->
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
Router, State-Management, Navigation, Initialisierung.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const APP_VER = '741'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
const APP_VER = '742'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||||
const APP_VERSION = '1.5.0'; // ← semantische Version, wird bei make release gesetzt
|
const APP_VERSION = '1.5.0'; // ← semantische Version, wird bei make release gesetzt
|
||||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -594,7 +594,18 @@ window.Worlds = (() => {
|
||||||
|
|
||||||
function _chipsForWorld(world) {
|
function _chipsForWorld(world) {
|
||||||
const pages = _getConfig()[world] || _DEFAULT_CONFIG[world];
|
const pages = _getConfig()[world] || _DEFAULT_CONFIG[world];
|
||||||
return pages.map(_chipMeta).filter(c => c && _chipAllowed(c));
|
const chips = pages.map(_chipMeta).filter(c => c && _chipAllowed(c));
|
||||||
|
// Sicherheitsnetz: Rolle-gebundene Chips immer einfügen wenn berechtigt
|
||||||
|
const u = _state?.user;
|
||||||
|
const alreadyIn = new Set(chips.map(c => c.page));
|
||||||
|
const defaults = _DEFAULT_CONFIG[world] || [];
|
||||||
|
for (const page of defaults) {
|
||||||
|
if (alreadyIn.has(page)) continue;
|
||||||
|
const meta = _chipMeta(page);
|
||||||
|
if (!meta?.role) continue; // nur role-gebundene Chips
|
||||||
|
if (_chipAllowed(meta)) { chips.push(meta); alreadyIn.add(page); }
|
||||||
|
}
|
||||||
|
return chips;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── KONFIGURATIONS-MODAL ─────────────────────────────────────
|
// ── KONFIGURATIONS-MODAL ─────────────────────────────────────
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications + Tile-Cache
|
Offline-Cache + Push Notifications + Tile-Cache
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v741';
|
const CACHE_VERSION = 'by-v742';
|
||||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||||
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue