From 33a09b1a6c889eba62226f211cd8912dded6364f Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 14 Sep 2026 20:44:30 +0800 Subject: [PATCH] refactor: delete VoiceMaterialSection.tsx (#1899 #1900) --- .../VoiceMaterialSection.tsx | 132 ------------------ 1 file changed, 132 deletions(-) delete mode 100644 apps/web/src/pages/editing-planner/components/clip-properties/clip-detail-section/VoiceMaterialSection.tsx diff --git a/apps/web/src/pages/editing-planner/components/clip-properties/clip-detail-section/VoiceMaterialSection.tsx b/apps/web/src/pages/editing-planner/components/clip-properties/clip-detail-section/VoiceMaterialSection.tsx deleted file mode 100644 index 9b77a1624..000000000 --- a/apps/web/src/pages/editing-planner/components/clip-properties/clip-detail-section/VoiceMaterialSection.tsx +++ /dev/null @@ -1,132 +0,0 @@ -import React from "react" -import { useNavigate } from "react-router-dom" -import type { ClipData } from "@/pages/editing-planner/types" -import { getGenderLabel } from "@/pages/editing-planner/utils/clipProperties" -import type { AssetItem } from "@/api/assets" - -interface VoiceMaterialSectionProps { - clip: ClipData - voiceMaterials: AssetItem[] - voiceMaterialsLoading: boolean - onClipUpdate: (clipId: string, data: Partial) => void - onRefreshVoiceMaterials?: () => void - onClipVoiceSelect?: (clipId: string, asset: AssetItem | null) => void - previewingId: string | null - onPreviewVoice: (asset: AssetItem) => void - onStopPreview: () => void -} - -/** - * 配音素材选择区(仅 voice 类型显示) - */ -export const VoiceMaterialSection: React.FC = ({ - clip, - voiceMaterials, - voiceMaterialsLoading, - onClipUpdate, - onRefreshVoiceMaterials, - onClipVoiceSelect, - previewingId, - onPreviewVoice, - onStopPreview, -}) => { - const navigate = useNavigate() - - return ( - <> - {/* 素材起始时间 */} -
-
素材起始时间
-
- - onClipUpdate(clip.id, { - startOffset: Math.max(0, Math.min(9999, Number(e.target.value) || 0)), - }) - } - /> - 秒 -
-
- - {/* 配音素材选择 */} -
-
- 配音素材 - {onRefreshVoiceMaterials && ( - - )} -
- - {voiceMaterialsLoading && voiceMaterials.length === 0 ? ( -
加载中...
- ) : ( - <> -
- - {clip.voice_asset_id && ( - - )} -
- {voiceMaterials.length === 0 && ( -
暂无配音素材,请先上传
- )} - - )} - - -
- - ) -}