feat(video): show saved transcripts in the player

This commit is contained in:
yiling
2026-12-03 11:19:22 +08:00
parent e806435e49
commit 3952928b88
26 changed files with 1103 additions and 33 deletions
@@ -0,0 +1,31 @@
import { cn } from '@/ui/lib/utils'
import { m } from '@/ui/paraglide/messages.js'
import { ListVideo } from 'lucide-react'
import type { TranscriptToggle } from '../types'
export function TranscriptToggleButton({
panelId,
open,
buttonRef,
onToggle,
className,
}: TranscriptToggle & { className?: string }) {
return (
<button
ref={buttonRef}
type="button"
aria-label={m.transcript_view()}
aria-expanded={open}
aria-controls={open ? panelId : undefined}
title={m.transcript_view()}
className={cn(
'shrink-0 rounded transition-colors hover:text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none',
open && 'text-primary',
className,
)}
onClick={onToggle}
>
<ListVideo className="size-5" aria-hidden="true" />
</button>
)
}