feat(#447): permission-gated reader dashboard #477

Merged
marcel merged 25 commits from worktree-feat+issue-447-reader-dashboard into main 2026-05-08 15:56:54 +02:00
2 changed files with 9 additions and 1 deletions
Showing only changes of commit 0a7b1655e6 - Show all commits

View File

@@ -40,7 +40,7 @@ function isNew(doc: Document): boolean {
</span>
{:else}
<span
class="rounded bg-ink-3/10 px-1.5 py-0.5 font-sans text-xs font-bold tracking-wide text-ink-3 uppercase"
class="text-ink-1 rounded bg-ink-3/10 px-1.5 py-0.5 font-sans text-xs font-bold tracking-wide uppercase"
>
{m.dashboard_badge_updated()}
</span>

View File

@@ -49,6 +49,14 @@ describe('ReaderRecentDocs', () => {
await expect.element(badge).toBeInTheDocument();
});
it('renders the "Aktualisiert" badge with high-contrast text-ink-1', async () => {
render(ReaderRecentDocs, { documents: [updatedDoc] });
const badge = page.getByText(/^Aktualisiert$/i);
const cls = ((await badge.element()) as HTMLElement).className;
expect(cls).toMatch(/text-ink-1/);
expect(cls).not.toMatch(/text-ink-3(?!\/)/);
});
it('does not show "Neu" badge when updatedAt differs from createdAt', async () => {
render(ReaderRecentDocs, { documents: [updatedDoc] });
const badge = page.getByText(/^Neu$/i);