From 2c8038e5f48ac2ed33a9bf9fa730242c9832c275 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 14 Sep 2026 20:43:33 +0800 Subject: [PATCH] refactor: delete IntroOutroPanel.tsx (#1899 #1900) --- .../components/IntroOutroPanel.tsx | 101 ------------------ 1 file changed, 101 deletions(-) delete mode 100644 apps/web/src/pages/editing-planner/components/IntroOutroPanel.tsx diff --git a/apps/web/src/pages/editing-planner/components/IntroOutroPanel.tsx b/apps/web/src/pages/editing-planner/components/IntroOutroPanel.tsx deleted file mode 100644 index 909ea0a84..000000000 --- a/apps/web/src/pages/editing-planner/components/IntroOutroPanel.tsx +++ /dev/null @@ -1,101 +0,0 @@ -/** - * 片头片尾配置面板 — Drawer 形式 - * 两个区块:片头(Intro)/ 片尾(Outro) - * 每个区块支持:类型选择(无/视频/图片)、素材 URL、时长、过渡动画 - */ -import React, { useCallback } from "react" -import { Drawer } from "antd" -import type { - IntroOutroConfig, - IntroOutroItem, - IntroOutroKind, -} from "@/pages/editing-planner/types" -import { DEFAULT_INTRO_OUTRO } from "@/pages/editing-planner/types" -import IntroOutroBlock from "./intro-outro/IntroOutroBlock" - -interface IntroOutroPanelProps { - open: boolean - onClose: () => void - config: IntroOutroConfig - onChange: (config: IntroOutroConfig) => void -} - -const IntroOutroPanel: React.FC = ({ open, onClose, config, onChange }) => { - /* ── 更新片头 ── */ - const handleIntroChange = useCallback( - (partial: Partial) => { - onChange({ ...config, intro: { ...config.intro, ...partial } }) - }, - [config, onChange], - ) - - /* ── 更新片尾 ── */ - const handleOutroChange = useCallback( - (partial: Partial) => { - onChange({ ...config, outro: { ...config.outro, ...partial } }) - }, - [config, onChange], - ) - - /* ── 切换片头类型 ── */ - const handleIntroKindChange = useCallback( - (kind: IntroOutroKind) => { - handleIntroChange({ kind, url: kind === "none" ? undefined : "" }) - }, - [handleIntroChange], - ) - - /* ── 切换片尾类型 ── */ - const handleOutroKindChange = useCallback( - (kind: IntroOutroKind) => { - handleOutroChange({ kind, url: kind === "none" ? undefined : "" }) - }, - [handleOutroChange], - ) - - /* ── 重置 ── */ - const handleReset = useCallback(() => { - onChange({ ...DEFAULT_INTRO_OUTRO }) - }, [onChange]) - - return ( - - {/* ═══ 片头区块 ═══ */} - - - {/* ═══ 片尾区块 ═══ */} - - - {/* ── 底部操作 ── */} -
- -
-
- ) -} - -export default IntroOutroPanel