feat: add manual video tagging

This commit is contained in:
2026-04-29 21:20:21 +08:00
parent 02d37f3953
commit eac6ad2343
17 changed files with 1066 additions and 418 deletions
@@ -8,14 +8,17 @@ interface TranscriptPanelProps {
open: boolean;
onClose: () => void;
transcript: VideoTranscript | null;
contentTags?: string[];
}
export function TranscriptPanel({
open,
onClose,
transcript,
contentTags,
}: TranscriptPanelProps) {
const [copiedIndex, setCopiedIndex] = useState<number | null>(null);
const displayTags = contentTags ?? transcript?.content_tags ?? [];
const [copiedAll, setCopiedAll] = useState(false);
if (!open) return null;
@@ -94,9 +97,9 @@ export function TranscriptPanel({
语言: {transcript.language}
</p>
)}
{transcript.content_tags?.length > 0 && (
{displayTags.length > 0 && (
<div className="mt-2 flex flex-wrap gap-1.5">
{transcript.content_tags.map((tag) => (
{displayTags.map((tag) => (
<span
key={tag}
className="rounded bg-blue-500/15 px-2 py-0.5 text-xs text-blue-200"