feat(frontend): render DocumentThumbnail in DocumentRow and PersonDocumentList

Home search rows and person detail sidebars now show the real
first-page preview when one exists, falling back to the PDF icon
for documents the backfill hasn't processed yet. The old `variant`
prop on PersonDocumentList is removed — it tinted the icon
differently for sent vs received, which no longer applies with a
uniform thumbnail tile.

Refs #307

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-22 22:36:20 +02:00
parent be184d8faf
commit 04ebd2a5bd
3 changed files with 12 additions and 22 deletions

View File

@@ -6,6 +6,7 @@ import { formatDate } from '$lib/utils/date';
import * as m from '$lib/paraglide/messages.js';
import ProgressRing from './ProgressRing.svelte';
import ContributorStack from './ContributorStack.svelte';
import DocumentThumbnail from './DocumentThumbnail.svelte';
type DocumentSearchItem = components['schemas']['DocumentSearchItem'];
@@ -37,7 +38,10 @@ function safeTagColor(color: string | null | undefined): string {
<li class="group transition-colors duration-200 hover:bg-muted/50">
<a href="/documents/{doc.id}" class="block px-4 py-4 sm:py-5">
<div class="flex gap-0 sm:gap-5">
<div class="flex gap-3 sm:gap-5">
<!-- Thumbnail tile -->
<DocumentThumbnail doc={doc} />
<!-- Left column -->
<div class="flex-1 sm:border-r sm:border-line sm:pr-5">
<!-- Title -->