Fix: 'Weitere Funktionen' zeigt nur ausgeblendete Chips — bereits konfigurierte werden gefiltert (SW by-v752)

This commit is contained in:
rene 2026-05-07 16:43:30 +02:00
parent bd7b694874
commit cf2191efeb
4 changed files with 14 additions and 7 deletions

View file

@ -3,7 +3,7 @@
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 IS_STAGING = location.hostname === 'staging.banyaro.app';

View file

@ -311,7 +311,7 @@ window.Worlds = (() => {
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">
<svg class="ph-icon" style="width:16px;height:16px"><use href="/icons/phosphor.svg#squares-four"></use></svg>
Alle Funktionen
Weitere Funktionen
</button>
</div>
`;
@ -343,8 +343,13 @@ window.Worlds = (() => {
const worldNames = ['jetzt', 'hund', '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 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 '';
return `
<div style="margin-bottom:20px">
@ -378,13 +383,15 @@ window.Worlds = (() => {
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">
<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%;
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>
</button>
</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>
`;