diff --git a/src/renderer-archive.ts b/src/renderer-archive.ts index 839c536..e47c1a9 100644 --- a/src/renderer-archive.ts +++ b/src/renderer-archive.ts @@ -110,15 +110,13 @@ function renderArchiveSearchResults(result: ArchiveSearchResult): void { } if (result.hits.length === 0) { - applyArchiveHtml(resultsEl, `
${escapeArchiveHtml(UI_TEXT.static.archiveNoMatches || 'Keine Treffer.')}
`); + applyArchiveHtml(resultsEl, `
${escapeArchiveHtml(UI_TEXT.static.archiveNoMatches || 'Keine Treffer.')}
`); return; } const rows = result.hits.map((hit) => { const date = new Date(hit.mtimeMs).toLocaleString(); - const typeBadge = hit.type === 'live' - ? `LIVE` - : `VOD`; + const typeBadge = `${hit.type === 'live' ? 'LIVE' : 'VOD'}`; const safeFullAttr = hit.fullPath.replace(/\\/g, '\\\\').replace(/'/g, "\\'"); const chatBtn = hit.chatPath ? `` @@ -127,17 +125,17 @@ function renderArchiveSearchResults(result: ArchiveSearchResult): void { ? `` : ''; return ` -
-
-
+
+
+
${typeBadge} - ${escapeArchiveHtml(hit.streamer)} - ${escapeArchiveHtml(date)} + ${escapeArchiveHtml(hit.streamer)} + ${escapeArchiveHtml(date)}
-
${escapeArchiveHtml(hit.fileName)}
-
${escapeArchiveHtml(formatBytesForArchive(hit.size))}
+
${escapeArchiveHtml(hit.fileName)}
+
${escapeArchiveHtml(formatBytesForArchive(hit.size))}
-
+
${chatBtn} diff --git a/src/styles.css b/src/styles.css index 1a9c2d2..620fd83 100644 --- a/src/styles.css +++ b/src/styles.css @@ -2116,6 +2116,98 @@ select option { margin-top: 10px; } +/* ============================================ + ARCHIVE SEARCH RESULTS — row layout + ============================================ + Replaces ~10 inline-styled divs in renderer-archive's row template + with reusable classes. Hover background scoped to the row so the + list scans as a real interactive list. */ +.archive-no-matches { + color: var(--text-secondary); + padding: 12px; +} + +.archive-result-row { + display: flex; + padding: 10px 8px; + border-bottom: 1px solid var(--border-soft); + gap: 10px; + align-items: center; + transition: background 0.12s; +} + +.archive-result-row:hover { + background: rgba(255, 255, 255, 0.03); +} + +.archive-result-row:last-child { + border-bottom: none; +} + +.archive-result-body { + flex: 1; + min-width: 0; +} + +.archive-result-meta { + display: flex; + gap: 8px; + align-items: center; + margin-bottom: 4px; + flex-wrap: wrap; +} + +.archive-result-streamer { + color: var(--text); +} + +.archive-result-date { + font-size: 12px; + color: var(--text-secondary); + font-variant-numeric: tabular-nums; +} + +.archive-result-filename { + font-size: 13px; + color: var(--text); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.archive-result-size { + font-size: 11px; + color: var(--text-secondary); + margin-top: 2px; + font-variant-numeric: tabular-nums; +} + +.archive-result-actions { + display: flex; + flex-direction: column; + gap: 4px; + flex-shrink: 0; +} + +/* Type pill — LIVE / VOD chip in the archive row's meta line. */ +.archive-type-badge { + font-size: 10px; + font-weight: 700; + padding: 2px 6px; + border-radius: 3px; + letter-spacing: 0.3px; +} + +.archive-type-badge.live { + background: rgba(255, 68, 68, 0.18); + color: #ff4444; +} + +.archive-type-badge.vod { + background: rgba(145, 70, 255, 0.18); + color: #9146ff; +} + /* Old generic scrollbar rules were dead — superseded by the purple-themed *::-webkit-scrollbar block further down the file. Removed to avoid confusion when someone greps for scrollbar styles. */