feat(ui): wire panelMode state with read/edit view switching

Adds TranscriptionPanelHeader and TranscriptionReadView to the
document detail page. Default mode is 'read' when blocks exist,
'edit' otherwise. Annotations dimmed in read mode.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-07 11:21:15 +02:00
parent 306eef2e95
commit e089192d7a
3 changed files with 69 additions and 15 deletions

View File

@@ -20,6 +20,7 @@ type Props = {
blockNumbers?: Record<string, number>;
annotationReloadKey?: number;
activeAnnotationId: string | null;
annotationsDimmed?: boolean;
onAnnotationClick: (id: string) => void;
onTranscriptionDraw?: (rect: DrawRect) => void;
};
@@ -33,6 +34,7 @@ let {
blockNumbers = {},
annotationReloadKey = 0,
activeAnnotationId = $bindable(),
annotationsDimmed = false,
onAnnotationClick,
onTranscriptionDraw
}: Props = $props();
@@ -90,6 +92,7 @@ let {
blockNumbers={blockNumbers}
annotationReloadKey={annotationReloadKey}
bind:activeAnnotationId={activeAnnotationId}
annotationsDimmed={annotationsDimmed}
onAnnotationClick={onAnnotationClick}
onTranscriptionDraw={onTranscriptionDraw}
documentFileHash={doc.fileHash ?? null}