feat(dashboard): show block count instead of page numbers in resume strip

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-19 21:32:13 +02:00
parent 3aec856bac
commit 18e321b1e6
6 changed files with 16 additions and 10 deletions

View File

@@ -713,7 +713,7 @@
"greeting_evening": "Guten Abend, {name}.", "greeting_evening": "Guten Abend, {name}.",
"dashboard_resume_label": "Weiter, wo du aufgehört hast", "dashboard_resume_label": "Weiter, wo du aufgehört hast",
"dashboard_page_of": "Seite {page} von {pages}", "dashboard_blocks": "{count} Abschnitte",
"dashboard_resume_cta": "Weitertranskribieren", "dashboard_resume_cta": "Weitertranskribieren",
"dashboard_resume_other": "oder anderen Brief wählen", "dashboard_resume_other": "oder anderen Brief wählen",
"dashboard_empty_title": "Noch kein Dokument begonnen", "dashboard_empty_title": "Noch kein Dokument begonnen",
@@ -739,6 +739,7 @@
"pulse_uploaded": "Dokumente hochgeladen", "pulse_uploaded": "Dokumente hochgeladen",
"feed_caption": "Kommentare & Aktivität", "feed_caption": "Kommentare & Aktivität",
"feed_show_all": "Alle anzeigen",
"feed_for_you": "für dich", "feed_for_you": "für dich",
"audit_action_text_saved": "hat Text gespeichert in", "audit_action_text_saved": "hat Text gespeichert in",

View File

@@ -713,7 +713,7 @@
"greeting_evening": "Good evening, {name}.", "greeting_evening": "Good evening, {name}.",
"dashboard_resume_label": "Continue where you left off", "dashboard_resume_label": "Continue where you left off",
"dashboard_page_of": "Page {page} of {pages}", "dashboard_blocks": "{count} sections",
"dashboard_resume_cta": "Continue transcribing", "dashboard_resume_cta": "Continue transcribing",
"dashboard_resume_other": "or choose another document", "dashboard_resume_other": "or choose another document",
"dashboard_empty_title": "No document started yet", "dashboard_empty_title": "No document started yet",
@@ -739,6 +739,7 @@
"pulse_uploaded": "Documents uploaded", "pulse_uploaded": "Documents uploaded",
"feed_caption": "Comments & activity", "feed_caption": "Comments & activity",
"feed_show_all": "Show all",
"feed_for_you": "for you", "feed_for_you": "for you",
"audit_action_text_saved": "saved text in", "audit_action_text_saved": "saved text in",

View File

@@ -713,7 +713,7 @@
"greeting_evening": "Buenas noches, {name}.", "greeting_evening": "Buenas noches, {name}.",
"dashboard_resume_label": "Continuar donde lo dejaste", "dashboard_resume_label": "Continuar donde lo dejaste",
"dashboard_page_of": "Página {page} de {pages}", "dashboard_blocks": "{count} secciones",
"dashboard_resume_cta": "Continuar transcripción", "dashboard_resume_cta": "Continuar transcripción",
"dashboard_resume_other": "o elige otro documento", "dashboard_resume_other": "o elige otro documento",
"dashboard_empty_title": "Aún no has comenzado ningún documento", "dashboard_empty_title": "Aún no has comenzado ningún documento",
@@ -739,6 +739,7 @@
"pulse_uploaded": "Documentos subidos", "pulse_uploaded": "Documentos subidos",
"feed_caption": "Comentarios y actividad", "feed_caption": "Comentarios y actividad",
"feed_show_all": "Ver todo",
"feed_for_you": "para ti", "feed_for_you": "para ti",
"audit_action_text_saved": "guardó texto en", "audit_action_text_saved": "guardó texto en",

View File

@@ -67,7 +67,7 @@ const { resumeDoc }: Props = $props();
<span class="text-[#A6DAD8]"></span> <span class="text-[#A6DAD8]"></span>
{m.dashboard_resume_label()} {m.dashboard_resume_label()}
· ·
{m.dashboard_page_of({ page: resumeDoc.page, pages: resumeDoc.pages })} {m.dashboard_blocks({ count: resumeDoc.totalBlocks })}
</p> </p>
<h2 class="font-serif text-[1.75rem] leading-tight text-ink">{resumeDoc.title}</h2> <h2 class="font-serif text-[1.75rem] leading-tight text-ink">{resumeDoc.title}</h2>
@@ -91,7 +91,7 @@ const { resumeDoc }: Props = $props();
> >
<div class="h-full rounded-full bg-accent" style="width:{resumeDoc.pct}%"></div> <div class="h-full rounded-full bg-accent" style="width:{resumeDoc.pct}%"></div>
</div> </div>
{#each resumeDoc.collaborators.slice(0, 3) as collab (collab.initials)} {#each resumeDoc.collaborators.slice(0, 3) as collab (collab.initials + collab.color)}
<span <span
class="-ml-1 inline-flex h-6 w-6 items-center justify-center rounded-full font-sans text-[10px] font-bold text-white ring-2 ring-white" class="-ml-1 inline-flex h-6 w-6 items-center justify-center rounded-full font-sans text-[10px] font-bold text-white ring-2 ring-white"
style="background:{collab.color}">{collab.initials}</span style="background:{collab.color}">{collab.initials}</span

View File

@@ -16,8 +16,7 @@ const mockResume: DashboardResumeDTO = {
title: 'Geburtsurkunde 1920', title: 'Geburtsurkunde 1920',
caption: 'Max Mustermann · 1920-01-01', caption: 'Max Mustermann · 1920-01-01',
excerpt: 'Hiermit wird beurkundet…', excerpt: 'Hiermit wird beurkundet…',
page: 1, totalBlocks: 4,
pages: 4,
pct: 75, pct: 75,
collaborators: [] collaborators: []
}; };
@@ -47,4 +46,10 @@ describe('DashboardResumeStrip', () => {
const link = page.getByRole('link', { name: /Weitertranskribieren/i }); const link = page.getByRole('link', { name: /Weitertranskribieren/i });
await expect.element(link).toHaveAttribute('href', '/documents/doc-123'); await expect.element(link).toHaveAttribute('href', '/documents/doc-123');
}); });
it('shows block count label', async () => {
render(DashboardResumeStrip, { resumeDoc: mockResume });
const label = page.getByText(/4 Abschnitte/i);
await expect.element(label).toBeInTheDocument();
});
}); });

View File

@@ -1982,9 +1982,7 @@ export interface components {
caption: string; caption: string;
excerpt: string; excerpt: string;
/** Format: int32 */ /** Format: int32 */
page: number; totalBlocks: number;
/** Format: int32 */
pages: number;
/** Format: int32 */ /** Format: int32 */
pct: number; pct: number;
thumbnailUrl?: string; thumbnailUrl?: string;