From c8fa0e0f19ea22b53441be8c0817375a9d7a7a34 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 14 Sep 2026 20:44:03 +0800 Subject: [PATCH] refactor: delete SubtitleStylePanel.tsx (#1899 #1900) --- .../components/SubtitleStylePanel.tsx | 147 ------------------ 1 file changed, 147 deletions(-) delete mode 100755 apps/web/src/pages/editing-planner/components/SubtitleStylePanel.tsx diff --git a/apps/web/src/pages/editing-planner/components/SubtitleStylePanel.tsx b/apps/web/src/pages/editing-planner/components/SubtitleStylePanel.tsx deleted file mode 100755 index fc3982506..000000000 --- a/apps/web/src/pages/editing-planner/components/SubtitleStylePanel.tsx +++ /dev/null @@ -1,147 +0,0 @@ -import React from "react" -import { Drawer, Slider, ColorPicker, Select } from "antd" -import type { Color } from "antd/es/color-picker" -import type { SubtitleStyleConfig } from "@/pages/editing-planner/types/subtitle" -import { - FONT_OPTIONS, - ANIMATION_OPTIONS, - ASR_LANGUAGE_OPTIONS, -} from "@/pages/editing-planner/constants/subtitleStyle" -import SubtitlePreview from "./subtitle-style/SubtitlePreview" -import { SubtitleModeSwitch } from "./subtitle-style/SubtitleModeSwitch" -import { SubtitlePositionSelector } from "./subtitle-style/SubtitlePositionSelector" -import { SubtitleEffectButtons } from "./subtitle-style/SubtitleEffectButtons" - -interface SubtitleStylePanelProps { - open: boolean - onClose: () => void - config: SubtitleStyleConfig - onChange: (config: SubtitleStyleConfig) => void -} - -const SubtitleStylePanel: React.FC = ({ - open, - onClose, - config, - onChange, -}) => { - const update = (partial: Partial) => { - onChange({ ...config, ...partial }) - } - - return ( - -
-
- 启用字幕 -
update({ enabled: !config.enabled })} - > -
-
-
-
- - {config.enabled && ( - <> -
- - update({ mode })} /> -
- - {config.mode === "asr" && ( -
- - update({ font: v })} - options={FONT_OPTIONS.map((f) => ({ value: f, label: f }))} - popupMatchSelectWidth={false} - /> -
- -
- - update({ position })} - /> -
- -
- - update({ stroke })} - onShadowChange={(shadow) => update({ shadow })} - /> -
- -
- -