diff --git a/apps/web/src/pages/editing-planner/components/RightPanel.tsx b/apps/web/src/pages/editing-planner/components/RightPanel.tsx deleted file mode 100644 index 61c87633f..000000000 --- a/apps/web/src/pages/editing-planner/components/RightPanel.tsx +++ /dev/null @@ -1,176 +0,0 @@ -import React from "react" -import ClipPropertiesPanel from "./ClipPropertiesPanel" -import EditorClipList from "./EditorClipList" -import type { ClipData } from "../types" -import type { SubtitleStyleConfig } from "../types/subtitle" -import type { BgmMixConfig } from "@/api/bgm" -import type { TemplateMode } from "@/api/editing-planner" -import type { TitleConfig } from "@/api/template-editor" -import type { AssetItem } from "@/api/assets" - -interface RightPanelProps { - titleConfig?: TitleConfig - onTitleConfigChange?: (config: TitleConfig | ((prev: TitleConfig) => TitleConfig)) => void - rightTab: "properties" | "clips" - onTabChange: (tab: "properties" | "clips") => void - // 属性 tab - selectedClip: ClipData | null - subtitleSettings: SubtitleStyleConfig - bgmSettings: BgmMixConfig - clipsCount: number - totalDuration: number - currentMode: TemplateMode - onSubtitleSettingsChange: (partial: Partial) => void - onBgmSettingsChange: (partial: Partial) => void - onClipUpdate: (clipId: string, updates: Partial) => void - onOpenBgmDrawer: () => void - onOpenSubtitleDrawer: () => void - voiceMaterials: AssetItem[] - voiceMaterialsLoading: boolean - onRefreshVoiceMaterials: () => void - onClipVoiceSelect: (clipId: string, asset: AssetItem | null) => void - onOpenTransitionDrawer: (clipId?: string) => void - onOpenSpeedDrawer: (clipId: string) => void - onOpenTtsDrawer: (clipId: string) => void - onOpenWatermarkDrawer: () => void - onOpenIntroOutroDrawer: () => void - onOpenPipDrawer: () => void - onOpenFilterDrawer: () => void - onOpenGreenScreenDrawer: () => void - onOpenStickerDrawer: () => void - // 片段 tab - clips: ClipData[] - selectedClipId: string | null - onClipSelect: (clipId: string) => void - onClipMoveUp: (clipId: string) => void - onClipMoveDown: (clipId: string) => void - onClipRemove: (clipId: string) => void - onClipAdd: () => void -} - -const RightPanel: React.FC = ({ - titleConfig, - onTitleConfigChange, - rightTab, - onTabChange, - selectedClip, - subtitleSettings, - bgmSettings, - clipsCount, - totalDuration, - currentMode, - onSubtitleSettingsChange, - onBgmSettingsChange, - onClipUpdate, - onOpenBgmDrawer, - onOpenSubtitleDrawer, - voiceMaterials, - voiceMaterialsLoading, - onRefreshVoiceMaterials, - onClipVoiceSelect, - onOpenTransitionDrawer, - onOpenSpeedDrawer, - onOpenTtsDrawer, - onOpenWatermarkDrawer, - onOpenIntroOutroDrawer, - onOpenPipDrawer, - onOpenFilterDrawer, - onOpenGreenScreenDrawer, - onOpenStickerDrawer, - clips, - selectedClipId, - onClipSelect, - onClipMoveUp, - onClipMoveDown, - onClipRemove, - onClipAdd, -}) => { - return ( -
- {/* Tab 切换 */} -
- - -
- - {/* 属性 Tab */} - {rightTab === "properties" && ( -
- {(() => { - // ClipPropertiesPanel 内部类型与主文件类型结构一致但字段细节不同 - // 使用 unknown 作为中间类型避免 any 警告 - const sub = subtitleSettings as unknown as React.ComponentProps< - typeof ClipPropertiesPanel - >["subtitleSettings"] - const bgm = bgmSettings as unknown as React.ComponentProps< - typeof ClipPropertiesPanel - >["bgmSettings"] - const onSubChange = onSubtitleSettingsChange as unknown as React.ComponentProps< - typeof ClipPropertiesPanel - >["onSubtitleSettingsChange"] - const onBgmChange = onBgmSettingsChange as unknown as React.ComponentProps< - typeof ClipPropertiesPanel - >["onBgmSettingsChange"] - return ( - - ) - })()} -
- )} - - {/* 片段 Tab */} - {rightTab === "clips" && ( -
- -
- )} -
- ) -} - -export default RightPanel