fix(dashboard): replace text-brand-navy dark:text-brand-mint with text-ink
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 4m7s
CI / OCR Service Tests (pull_request) Successful in 35s
CI / Backend Unit Tests (pull_request) Failing after 3m18s
CI / Unit & Component Tests (push) Failing after 4m2s
CI / OCR Service Tests (push) Successful in 37s
CI / Backend Unit Tests (push) Failing after 3m25s
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 4m7s
CI / OCR Service Tests (pull_request) Successful in 35s
CI / Backend Unit Tests (pull_request) Failing after 3m18s
CI / Unit & Component Tests (push) Failing after 4m2s
CI / OCR Service Tests (push) Successful in 37s
CI / Backend Unit Tests (push) Failing after 3m25s
text-ink uses --c-ink which is #012851 in light and #f0efe9 in dark, responding to both @media and [data-theme='dark'] via CSS variable — no extra token needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,7 +33,7 @@ const { drafts }: Props = $props();
|
||||
class="flex min-h-[44px] items-center justify-between border-b border-line/50 px-3 py-1.5 last:border-b-0 hover:bg-muted focus-visible:ring-2 focus-visible:ring-brand-navy focus-visible:outline-none"
|
||||
>
|
||||
<span class="flex min-w-0 flex-col">
|
||||
<span class="truncate font-serif text-sm text-brand-navy">{draft.title}</span>
|
||||
<span class="truncate font-serif text-sm text-ink">{draft.title}</span>
|
||||
<span class="text-[11px] text-ink-3">
|
||||
{m.dashboard_reader_draft_meta({ relative: relativeTimeDe(new Date(draft.updatedAt)) })}
|
||||
</span>
|
||||
|
||||
@@ -73,11 +73,11 @@ describe('ReaderDraftsModule', () => {
|
||||
expect(cls).toMatch(/min-h-\[44px\]/);
|
||||
});
|
||||
|
||||
it('draft title has text-brand-navy class', async () => {
|
||||
it('draft title has text-ink class', async () => {
|
||||
render(ReaderDraftsModule, { drafts: [draft1] });
|
||||
const link = page.getByRole('link', { name: /Mein erster Entwurf/ });
|
||||
const el = (await link.element()) as HTMLElement;
|
||||
const titleEl = el.querySelector('[class*="text-brand-navy"]');
|
||||
const titleEl = el.querySelector('[class*="text-ink"]');
|
||||
expect(titleEl).not.toBeNull();
|
||||
expect(titleEl?.textContent?.trim()).toBe('Mein erster Entwurf');
|
||||
});
|
||||
|
||||
@@ -24,12 +24,10 @@ const timeLabel = $derived.by(() => {
|
||||
>
|
||||
<!-- Greeting -->
|
||||
<div class="min-w-0 flex-1">
|
||||
<span
|
||||
class="block text-[11px] font-bold tracking-[.8px] text-brand-navy uppercase dark:text-brand-mint"
|
||||
>
|
||||
<span class="block text-[11px] font-bold tracking-[.8px] text-ink uppercase">
|
||||
{timeLabel}
|
||||
</span>
|
||||
<span class="block font-serif text-xl text-brand-navy dark:text-brand-mint">
|
||||
<span class="block font-serif text-xl text-ink">
|
||||
{m.dashboard_welcome({ name })}
|
||||
</span>
|
||||
</div>
|
||||
@@ -45,9 +43,7 @@ const timeLabel = $derived.by(() => {
|
||||
href="/documents"
|
||||
class="flex min-h-[44px] flex-col items-center justify-center border-r border-line-soft px-5 focus-visible:ring-2 focus-visible:ring-brand-navy focus-visible:outline-none"
|
||||
>
|
||||
<span class="block text-2xl leading-none font-black text-brand-navy dark:text-brand-mint"
|
||||
>{documents ?? '—'}</span
|
||||
>
|
||||
<span class="block text-2xl leading-none font-black text-ink">{documents ?? '—'}</span>
|
||||
<span
|
||||
class="mt-0.5 hidden text-[11px] font-bold tracking-[.8px] text-ink-3 uppercase sm:block"
|
||||
>{m.dashboard_reader_stats_documents()}</span
|
||||
@@ -62,9 +58,7 @@ const timeLabel = $derived.by(() => {
|
||||
href="/persons"
|
||||
class="flex min-h-[44px] flex-col items-center justify-center border-r border-line-soft px-5 focus-visible:ring-2 focus-visible:ring-brand-navy focus-visible:outline-none"
|
||||
>
|
||||
<span class="block text-2xl leading-none font-black text-brand-navy dark:text-brand-mint"
|
||||
>{persons ?? '—'}</span
|
||||
>
|
||||
<span class="block text-2xl leading-none font-black text-ink">{persons ?? '—'}</span>
|
||||
<span
|
||||
class="mt-0.5 hidden text-[11px] font-bold tracking-[.8px] text-ink-3 uppercase sm:block"
|
||||
>{m.dashboard_reader_stats_persons()}</span
|
||||
@@ -79,9 +73,7 @@ const timeLabel = $derived.by(() => {
|
||||
href="/geschichten"
|
||||
class="flex min-h-[44px] flex-col items-center justify-center px-5 focus-visible:ring-2 focus-visible:ring-brand-navy focus-visible:outline-none"
|
||||
>
|
||||
<span class="block text-2xl leading-none font-black text-brand-navy dark:text-brand-mint"
|
||||
>{stories ?? '—'}</span
|
||||
>
|
||||
<span class="block text-2xl leading-none font-black text-ink">{stories ?? '—'}</span>
|
||||
<span
|
||||
class="mt-0.5 hidden text-[11px] font-bold tracking-[.8px] text-ink-3 uppercase sm:block"
|
||||
>{m.dashboard_reader_stats_stories()}</span
|
||||
|
||||
@@ -55,12 +55,12 @@ describe('ReaderHeaderBar', () => {
|
||||
expect(text?.match(/—/g)?.length).toBeGreaterThanOrEqual(3);
|
||||
});
|
||||
|
||||
it('time label uses text-brand-navy class for morning hour', async () => {
|
||||
it('time label uses text-ink class for morning hour', async () => {
|
||||
render(ReaderHeaderBar, { name: 'Anna', documents: 1, persons: 1, stories: 1, hour: 8 });
|
||||
const timeLabel = page.getByText(/Morgen/i);
|
||||
await expect.element(timeLabel).toBeInTheDocument();
|
||||
const cls = ((await timeLabel.element()) as HTMLElement).className;
|
||||
expect(cls).toMatch(/text-brand-navy/);
|
||||
expect(cls).toMatch(/\btext-ink\b/);
|
||||
});
|
||||
|
||||
it('shows afternoon label for hour 14', async () => {
|
||||
|
||||
@@ -45,7 +45,7 @@ const { persons }: Props = $props();
|
||||
</span>
|
||||
<span class="truncate font-serif text-sm text-ink">{p.displayName ?? p.lastName}</span>
|
||||
<span
|
||||
class="rounded-full bg-mint-soft px-1.5 py-px text-[11px] font-bold text-brand-navy dark:bg-mint-soft dark:text-brand-mint"
|
||||
class="rounded-full bg-mint-soft px-1.5 py-px text-[11px] font-bold text-ink dark:bg-mint-soft"
|
||||
>
|
||||
{p.documentCount ?? 0}
|
||||
</span>
|
||||
|
||||
@@ -61,7 +61,7 @@ function isNew(doc: Document): boolean {
|
||||
<span class="truncate font-serif text-sm text-ink">{doc.title}</span>
|
||||
{#if isNew(doc)}
|
||||
<span
|
||||
class="shrink-0 rounded-full bg-mint-soft px-1.5 py-px text-[11px] font-bold text-brand-navy dark:bg-mint-soft dark:text-brand-mint"
|
||||
class="shrink-0 rounded-full bg-mint-soft px-1.5 py-px text-[11px] font-bold text-ink dark:bg-mint-soft"
|
||||
>
|
||||
{m.dashboard_badge_new()}
|
||||
</span>
|
||||
|
||||
@@ -95,7 +95,7 @@ describe('ReaderRecentDocs', () => {
|
||||
const cls = ((await badge.element()) as HTMLElement).className;
|
||||
expect(cls).toMatch(/bg-mint-soft/);
|
||||
expect(cls).toMatch(/rounded-full/);
|
||||
expect(cls).toMatch(/text-brand-navy/);
|
||||
expect(cls).toMatch(/\btext-ink\b/);
|
||||
});
|
||||
|
||||
it('shows no badge when updatedAt differs from createdAt', async () => {
|
||||
|
||||
Reference in New Issue
Block a user