Quellenübersicht: Detail-Liste mit Nummer, Datum und Link
Aufklapp-Liste pro Quelle zeigt jetzt: 1. fortlaufende Nummer (gold, monospace) 2. Datum + Uhrzeit (klein, dezent grau, monospace) 3. Headline als Link zum Originalartikel Drei-Spalten-Grid (Nummer | Datum | Headline). Auf schmalem Viewport (<600px) klappt das Datum unter die Nummer. Bei research-Lagen wird published_at bevorzugt, sonst collected_at. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
@@ -889,11 +889,13 @@ const App = {
|
||||
el.classList.add('active');
|
||||
el.setAttribute('aria-expanded', 'true');
|
||||
|
||||
const type = this._currentIncidentType;
|
||||
const getDate = (a) => (type === 'research' && a.published_at) ? a.published_at : (a.collected_at || a.published_at);
|
||||
const articles = (this._currentArticles || [])
|
||||
.filter(a => (a.source || 'Unbekannt') === sourceName)
|
||||
.sort((a, b) => {
|
||||
const ta = new Date(a.collected_at || a.published_at || 0).getTime();
|
||||
const tb = new Date(b.collected_at || b.published_at || 0).getTime();
|
||||
const ta = new Date(getDate(a) || 0).getTime();
|
||||
const tb = new Date(getDate(b) || 0).getTime();
|
||||
return tb - ta;
|
||||
});
|
||||
|
||||
@@ -902,14 +904,30 @@ const App = {
|
||||
if (articles.length === 0) {
|
||||
detail.innerHTML = '<div class="source-overview-detail-empty">Keine Artikel gefunden.</div>';
|
||||
} else {
|
||||
const items = articles.map(a => {
|
||||
const fmtDate = (ts) => {
|
||||
if (!ts) return '—';
|
||||
try {
|
||||
const d = new Date(ts);
|
||||
if (isNaN(d.getTime())) return '—';
|
||||
return d.toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit', year: '2-digit', timeZone: TIMEZONE })
|
||||
+ ' '
|
||||
+ d.toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit', timeZone: TIMEZONE });
|
||||
} catch (e) { return '—'; }
|
||||
};
|
||||
const items = articles.map((a, i) => {
|
||||
const num = i + 1;
|
||||
const dateStr = fmtDate(getDate(a));
|
||||
const headline = UI.escape(a.headline_de || a.headline || '(ohne Titel)');
|
||||
if (a.source_url) {
|
||||
return `<li><a href="${UI.escape(a.source_url)}" target="_blank" rel="noopener">${headline}</a></li>`;
|
||||
}
|
||||
return `<li>${headline}</li>`;
|
||||
const inner = a.source_url
|
||||
? `<a href="${UI.escape(a.source_url)}" target="_blank" rel="noopener">${headline}</a>`
|
||||
: headline;
|
||||
return `<li>
|
||||
<span class="source-overview-detail-num">${num}.</span>
|
||||
<span class="source-overview-detail-date">${UI.escape(dateStr)}</span>
|
||||
<span class="source-overview-detail-headline">${inner}</span>
|
||||
</li>`;
|
||||
}).join('');
|
||||
detail.innerHTML = `<ul class="source-overview-detail-list">${items}</ul>`;
|
||||
detail.innerHTML = `<ol class="source-overview-detail-list">${items}</ol>`;
|
||||
}
|
||||
el.insertAdjacentElement('afterend', detail);
|
||||
},
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren