From 1b8961ca1290f9ffd81dcf4cc8d6f390687e2b1f Mon Sep 17 00:00:00 2001 From: Claude Code Date: Fri, 22 May 2026 16:40:33 +0000 Subject: [PATCH] fix(sources): Typ-Filter in der Fall-Quellenuebersicht immer anzeigen Die Filter-Chips wurden nur eingeblendet, wenn ein Fall Telegram- oder X-Quellen hatte. Bei reinen Web-Faellen (z.B. in der Org jp_demo) fehlte die Filterleiste damit komplett. Sie wird jetzt immer angezeigt, sobald Quellen vorhanden sind, und zeigt zugleich, welche Quellentypen der Fall enthaelt. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/static/dashboard.html | 2 +- src/static/js/components.js | 27 +++++++++++++-------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/static/dashboard.html b/src/static/dashboard.html index 229e9b9..2946008 100644 --- a/src/static/dashboard.html +++ b/src/static/dashboard.html @@ -807,7 +807,7 @@ - + diff --git a/src/static/js/components.js b/src/static/js/components.js index 6775cb5..e8b705d 100644 --- a/src/static/js/components.js +++ b/src/static/js/components.js @@ -1034,25 +1034,24 @@ const UI = { html += `
${langChips}
`; html += ``; - // Typ-Filter-Chips (nur zeigen, wenn neben Web auch Telegram/X vorkommt) + // Typ-Filter-Chips: immer zeigen, sobald Quellen vorhanden sind. Die Leiste + // zeigt zugleich auf einen Blick, welche Quellentypen der Fall enthaelt. const typeCounts = { web: 0, telegram: 0, x: 0 }; data.sources.forEach(s => { const t = s.source_type || 'web'; typeCounts[t] = (typeCounts[t] || 0) + 1; }); - if (typeCounts.telegram > 0 || typeCounts.x > 0) { - const typeMeta = [ - { key: '', label: 'Alle', count: data.sources.length }, - { key: 'web', label: 'Web', count: typeCounts.web }, - { key: 'telegram', label: 'Telegram', count: typeCounts.telegram }, - { key: 'x', label: 'X', count: typeCounts.x }, - ]; - const chips = typeMeta - .filter(t => t.key === '' || t.count > 0) - .map(t => ``) - .join(''); - html += `
${chips}
`; - } + const typeMeta = [ + { key: '', label: 'Alle', count: data.sources.length }, + { key: 'web', label: 'Web', count: typeCounts.web }, + { key: 'telegram', label: 'Telegram', count: typeCounts.telegram }, + { key: 'x', label: 'X', count: typeCounts.x }, + ]; + const chips = typeMeta + .filter(t => t.key === '' || t.count > 0) + .map(t => ``) + .join(''); + html += `
${chips}
`; html += '
'; data.sources.forEach(s => { -- 2.49.1