From 0cf2e0edc693ca12f7ba29ea88bfbbc78245fbbd Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 14 Sep 2026 20:45:31 +0800 Subject: [PATCH] refactor: delete TemplateCard.tsx (#1899 #1900) --- .../my-templates/components/TemplateCard.tsx | 92 ------------------- 1 file changed, 92 deletions(-) delete mode 100644 apps/web/src/pages/my-templates/components/TemplateCard.tsx diff --git a/apps/web/src/pages/my-templates/components/TemplateCard.tsx b/apps/web/src/pages/my-templates/components/TemplateCard.tsx deleted file mode 100644 index 5017b5e4b..000000000 --- a/apps/web/src/pages/my-templates/components/TemplateCard.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import React from "react" -import { Card, Tag, Tooltip, Popconfirm, Space, Typography } from "antd" -import { EditOutlined, CopyOutlined, DeleteOutlined, VideoCameraOutlined } from "@ant-design/icons" -import { - MODE_LABELS, - MODE_COLORS, - type EditingTemplate, - type TemplateMode, -} from "@/api/editing-planner" - -const { Text } = Typography - -interface TemplateCardProps { - tpl: EditingTemplate - onEdit: (tpl: EditingTemplate) => void - onCopy: (tpl: EditingTemplate) => void - onGenerate: (tpl: EditingTemplate) => void - onDelete: (id: string) => void -} - -/** - * 单个模板卡片组件 - */ -export const TemplateCard: React.FC = ({ - tpl, - onEdit, - onCopy, - onGenerate, - onDelete, -}) => ( - - onEdit(tpl)} /> - , - - onCopy(tpl)} /> - , - - onGenerate(tpl)} /> - , - onDelete(tpl.id)} - okText="删除" - cancelText="取消" - > - - - - , - ]} - > -
- - {tpl.name} - - - {MODE_LABELS[tpl.mode as TemplateMode] || tpl.mode} - - 用户自制 -
- -
- - {tpl.segments.length} 个片段 - - {tpl.category && {tpl.category}} -
- - {tpl.tags.length > 0 && ( -
- {tpl.tags.map((tag) => ( - - {tag} - - ))} -
- )} - -
- - {tpl.title_config.ai_auto_select && AI标题} - {tpl.subtitle_config.enabled && 字幕} - {tpl.bgm_config.enabled && BGM} - -
-
-)