From 2708f14378a7a5b478332ab1ef0d4b9fa7d5e078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E6=9E=B3?= <7854742+wang_rumeng@user.noreply.gitee.com> Date: Fri, 29 Aug 2025 03:56:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ui/dialogue-item.tsx | 167 ------------------ components/ui/storyboard-card.tsx | 284 ------------------------------ 2 files changed, 451 deletions(-) delete mode 100644 components/ui/dialogue-item.tsx delete mode 100644 components/ui/storyboard-card.tsx diff --git a/components/ui/dialogue-item.tsx b/components/ui/dialogue-item.tsx deleted file mode 100644 index ad36e00..0000000 --- a/components/ui/dialogue-item.tsx +++ /dev/null @@ -1,167 +0,0 @@ -import React, { useState } from 'react'; -import { useSortable } from '@dnd-kit/sortable'; -import { CSS } from '@dnd-kit/utilities'; -import { motion } from 'framer-motion'; -import { GripVertical, Trash2, Edit2, ChevronDown } from 'lucide-react'; -import { DialogueItem as DialogueItemType, CharacterOption } from '@/app/model/enums'; -import KeywordText from './keyword-text'; -import * as Popover from '@radix-ui/react-popover'; -import { mockCharacterOptions } from '@/app/model/enums'; -import './style/dialogue-item.css'; - -interface DialogueItemProps { - dialogue: DialogueItemType; - onUpdate: (updates: Partial) => void; - onDelete: () => void; - onCharacterChange?: (character: CharacterOption) => void; -} - -const DialogueItem: React.FC = ({ - dialogue, - onUpdate, - onDelete, - onCharacterChange, -}) => { - const [isEditing, setIsEditing] = useState(false); - const [editText, setEditText] = useState(dialogue.text); - const [isCharacterSelectOpen, setIsCharacterSelectOpen] = useState(false); - - const { - attributes, - listeners, - setNodeRef, - transform, - transition, - isDragging, - } = useSortable({ id: dialogue.id }); - - const style = { - transform: CSS.Transform.toString(transform), - transition, - }; - - const handleSave = () => { - onUpdate({ text: editText }); - setIsEditing(false); - }; - - const handleCharacterSelect = (character: CharacterOption) => { - onUpdate({ speaker: character.name }); - onCharacterChange?.(character); - setIsCharacterSelectOpen(false); - }; - - return ( - - {/* Drag Handle */} -
- -
- - {/* Content */} -
- {/* Character Selector */} - - - - - - -
- {mockCharacterOptions.map((char) => ( - - ))} -
- -
- - - - - {isEditing ? ( -
-