feat: add Einführung button to annotation top bar that navigates back to the intro screen

This commit is contained in:
smaubio
2026-04-10 10:13:57 +02:00
parent 80d638024b
commit dcdcf6584c
2 changed files with 14 additions and 3 deletions

View File

@@ -24,12 +24,14 @@ interface AnnotationPageViewProps {
entries: DatasetEntryForAnnotation[]; entries: DatasetEntryForAnnotation[];
experimentId: number; experimentId: number;
viewType: string; viewType: string;
onShowIntro?: () => void;
} }
export default function AnnotationPageView({ export default function AnnotationPageView({
entries, entries,
experimentId, experimentId,
viewType, viewType,
onShowIntro,
}: AnnotationPageViewProps) { }: AnnotationPageViewProps) {
const [isPending, startTransition] = useTransition(); const [isPending, startTransition] = useTransition();
@@ -287,6 +289,15 @@ export default function AnnotationPageView({
</svg> </svg>
</button> </button>
{onShowIntro && (
<button
onClick={onShowIntro}
className="text-sm px-3 py-1.5 bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-md transition-colors"
>
Einführung
</button>
)}
{Object.keys(dialectScores).length > 0 && ( {Object.keys(dialectScores).length > 0 && (
<button <button
onClick={() => setIsCalibrationModalOpen(true)} onClick={() => setIsCalibrationModalOpen(true)}

View File

@@ -29,5 +29,5 @@ export default function AnnotationPhase({
); );
} }
return <AnnotationPageView entries={entries} experimentId={experimentId} viewType={viewType} />; return <AnnotationPageView entries={entries} experimentId={experimentId} viewType={viewType} onShowIntro={() => setShowInfoPage(true)} />;
} }