Fix: 'Weitere Funktionen' zeigt nur ausgeblendete Chips — bereits konfigurierte werden gefiltert (SW by-v752)
This commit is contained in:
parent
bd7b694874
commit
cf2191efeb
4 changed files with 14 additions and 7 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 = "751" # muss mit APP_VER in app.js übereinstimmen
|
APP_VER = "752" # muss mit APP_VER in app.js übereinstimmen
|
||||||
|
|
||||||
@app.get("/api/version")
|
@app.get("/api/version")
|
||||||
async def app_version():
|
async def app_version():
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
Router, State-Management, Navigation, Initialisierung.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const APP_VER = '751'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
const APP_VER = '752'; // ← 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';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,7 @@ window.Worlds = (() => {
|
||||||
width:100%;margin-top:${options.length ? '14px' : '0'};padding:12px;border:none;
|
width:100%;margin-top:${options.length ? '14px' : '0'};padding:12px;border:none;
|
||||||
background:none;cursor:pointer;color:var(--c-primary);font-size:var(--text-sm);font-weight:600">
|
background:none;cursor:pointer;color:var(--c-primary);font-size:var(--text-sm);font-weight:600">
|
||||||
<svg class="ph-icon" style="width:16px;height:16px"><use href="/icons/phosphor.svg#squares-four"></use></svg>
|
<svg class="ph-icon" style="width:16px;height:16px"><use href="/icons/phosphor.svg#squares-four"></use></svg>
|
||||||
Alle Funktionen
|
Weitere Funktionen
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
@ -343,8 +343,13 @@ window.Worlds = (() => {
|
||||||
const worldNames = ['jetzt', 'hund', 'welt'];
|
const worldNames = ['jetzt', 'hund', 'welt'];
|
||||||
const worldLabels = { jetzt: 'JETZT', hund: 'HUND', welt: 'WELT' };
|
const worldLabels = { jetzt: 'JETZT', hund: 'HUND', welt: 'WELT' };
|
||||||
|
|
||||||
|
// Alle Seiten die aktuell in irgendeiner Welt konfiguriert sind
|
||||||
|
const cfg = _getConfig();
|
||||||
|
const configured = new Set(worldNames.flatMap(w => cfg[w] || []));
|
||||||
|
|
||||||
const sections = worldNames.map(w => {
|
const sections = worldNames.map(w => {
|
||||||
const chips = (_DEFAULT_CONFIG[w] || []).map(_chipMeta).filter(c => c && _chipAllowed(c));
|
const chips = (_DEFAULT_CONFIG[w] || []).map(_chipMeta)
|
||||||
|
.filter(c => c && _chipAllowed(c) && !configured.has(c.page));
|
||||||
if (!chips.length) return '';
|
if (!chips.length) return '';
|
||||||
return `
|
return `
|
||||||
<div style="margin-bottom:20px">
|
<div style="margin-bottom:20px">
|
||||||
|
|
@ -378,13 +383,15 @@ window.Worlds = (() => {
|
||||||
padding:20px 16px calc(env(safe-area-inset-bottom,16px) + 16px);
|
padding:20px 16px calc(env(safe-area-inset-bottom,16px) + 16px);
|
||||||
box-shadow:0 -8px 32px rgba(0,0,0,0.2);max-height:82vh;overflow-y:auto">
|
box-shadow:0 -8px 32px rgba(0,0,0,0.2);max-height:82vh;overflow-y:auto">
|
||||||
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:20px">
|
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:20px">
|
||||||
<div style="font-size:var(--text-base);font-weight:700">Alle Funktionen</div>
|
<div style="font-size:var(--text-base);font-weight:700">Ausgeblendete Funktionen</div>
|
||||||
<button id="fab-close" style="background:var(--c-border);border:none;border-radius:50%;
|
<button id="fab-close" style="background:var(--c-border);border:none;border-radius:50%;
|
||||||
width:28px;height:28px;cursor:pointer;display:flex;align-items:center;justify-content:center">
|
width:28px;height:28px;cursor:pointer;display:flex;align-items:center;justify-content:center">
|
||||||
<svg class="ph-icon" style="width:14px;height:14px"><use href="/icons/phosphor.svg#x"></use></svg>
|
<svg class="ph-icon" style="width:14px;height:14px"><use href="/icons/phosphor.svg#x"></use></svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
${sections}
|
${sections || `<div style="text-align:center;padding:24px 0;color:var(--c-text-secondary);font-size:var(--text-sm)">
|
||||||
|
Alle Funktionen sind bereits in deinen Welten sichtbar.
|
||||||
|
</div>`}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications + Tile-Cache
|
Offline-Cache + Push Notifications + Tile-Cache
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v751';
|
const CACHE_VERSION = 'by-v752';
|
||||||
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