fix: replace hardcoded bg-white/border-brand-sand/text-brand-navy with semantic tokens in dashboard widgets
Some checks failed
CI / Backend Unit Tests (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
CI / Unit & Component Tests (push) Has been cancelled

All four dashboard components (ResumeStrip, Mentions, NeedsMetadata, RecentDocuments)
used static brand colors that do not adapt to dark mode. Replace with bg-surface,
border-line, text-ink, text-ink-2 throughout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-29 09:36:28 +02:00
parent b948c9a46c
commit 1a849362a1
4 changed files with 13 additions and 18 deletions

View File

@@ -16,16 +16,16 @@ let { mentions }: Props = $props();
</script> </script>
{#if mentions.length > 0} {#if mentions.length > 0}
<div data-testid="dashboard-mentions" class="border-brand-sand rounded-sm border bg-white p-6"> <div data-testid="dashboard-mentions" class="rounded-sm border border-line bg-surface p-6">
<h2 class="mb-4 font-sans text-xs font-bold tracking-widest text-gray-400 uppercase"> <h2 class="mb-4 font-sans text-xs font-bold tracking-widest text-gray-400 uppercase">
Erwähnungen Erwähnungen
</h2> </h2>
{#each mentions as mention (mention.id)} {#each mentions as mention (mention.id)}
<div class="border-brand-sand flex items-center gap-3 border-b py-2 last:border-0"> <div class="flex items-center gap-3 border-b border-line py-2 last:border-0">
{#if mention.documentId} {#if mention.documentId}
<a <a
href="/documents/{mention.documentId}" href="/documents/{mention.documentId}"
class="font-serif text-sm text-ink hover:text-brand-navy" class="font-serif text-sm text-ink hover:text-ink-2"
> >
{mention.actorName ?? ''} {mention.actorName ?? ''}
</a> </a>

View File

@@ -12,27 +12,22 @@ let { incompleteDocs }: Props = $props();
</script> </script>
{#if incompleteDocs.length > 0} {#if incompleteDocs.length > 0}
<div <div data-testid="dashboard-needs-metadata" class="rounded-sm border border-line bg-surface p-6">
data-testid="dashboard-needs-metadata"
class="border-brand-sand rounded-sm border bg-white p-6"
>
<h2 class="mb-4 font-sans text-xs font-bold tracking-widest text-gray-400 uppercase"> <h2 class="mb-4 font-sans text-xs font-bold tracking-widest text-gray-400 uppercase">
Metadaten fehlen Metadaten fehlen
</h2> </h2>
{#each incompleteDocs as doc (doc.id)} {#each incompleteDocs as doc (doc.id)}
<div class="border-brand-sand flex items-center border-b py-2 last:border-0"> <div class="flex items-center border-b border-line py-2 last:border-0">
<a <a
href="/enrich/{doc.id}" href="/enrich/{doc.id}"
class="font-serif text-sm text-ink hover:text-brand-navy hover:underline" class="font-serif text-sm text-ink hover:text-ink-2 hover:underline"
> >
{doc.title} {doc.title}
</a> </a>
</div> </div>
{/each} {/each}
<div class="mt-4"> <div class="mt-4">
<a href="/enrich" class="font-sans text-xs text-brand-navy/60 hover:text-brand-navy"> <a href="/enrich" class="font-sans text-xs text-ink-2 hover:text-ink"> Alle anzeigen </a>
Alle anzeigen
</a>
</div> </div>
</div> </div>
{/if} {/if}

View File

@@ -22,15 +22,15 @@ function formatDate(dateStr: string): string {
</script> </script>
{#if recentDocs.length > 0} {#if recentDocs.length > 0}
<div data-testid="dashboard-recent-docs" class="border-brand-sand rounded-sm border bg-white p-6"> <div data-testid="dashboard-recent-docs" class="rounded-sm border border-line bg-surface p-6">
<h2 class="mb-4 font-sans text-xs font-bold tracking-widest text-gray-400 uppercase"> <h2 class="mb-4 font-sans text-xs font-bold tracking-widest text-gray-400 uppercase">
Zuletzt hinzugefügt Zuletzt hinzugefügt
</h2> </h2>
{#each recentDocs as doc (doc.id)} {#each recentDocs as doc (doc.id)}
<div class="border-brand-sand flex items-center justify-between border-b py-2 last:border-0"> <div class="flex items-center justify-between border-b border-line py-2 last:border-0">
<a <a
href="/documents/{doc.id}" href="/documents/{doc.id}"
class="font-serif text-sm text-ink hover:text-brand-navy hover:underline" class="font-serif text-sm text-ink hover:text-ink-2 hover:underline"
> >
{doc.title} {doc.title}
</a> </a>

View File

@@ -26,10 +26,10 @@ onMount(() => {
{#if lastVisited} {#if lastVisited}
<div <div
data-testid="resume-strip" data-testid="resume-strip"
class="border-brand-sand flex items-center gap-2 rounded-sm border bg-white px-4 py-3 font-sans text-sm" class="flex items-center gap-2 rounded-sm border border-line bg-surface px-4 py-3 font-sans text-sm"
> >
<span class="text-gray-500">Zuletzt geöffnet:</span> <span class="text-ink-2">Zuletzt geöffnet:</span>
<a href="/documents/{lastVisited.id}" class="font-medium text-brand-navy hover:underline"> <a href="/documents/{lastVisited.id}" class="font-medium text-ink hover:underline">
{lastVisited.title || 'Zuletzt geöffnet'} {lastVisited.title || 'Zuletzt geöffnet'}
</a> </a>
</div> </div>