auto-save 2026-05-13 20:45 (~6)
This commit is contained in:
@@ -5,7 +5,9 @@ import { type NodeProps, useReactFlow } from "@xyflow/react"
|
||||
import {
|
||||
Link2, Upload, Download, Scissors, Image as ImageIcon,
|
||||
Mic, Languages, FileEdit, Film, FileVideo, Loader2, Plus, X, LayoutGrid, Pin, Maximize2,
|
||||
Copy, Trash2,
|
||||
} from "lucide-react"
|
||||
import { toast } from "sonner"
|
||||
import { NodeShell, type NodeStatus, type NodeKind } from "./node-shell"
|
||||
import {
|
||||
type Job, type ImageRef,
|
||||
@@ -39,6 +41,7 @@ export interface NodeData {
|
||||
onOpenPanel?: (key: string) => void // 控制 sidebar 哪个 drawer 展开
|
||||
onDeleteFrame?: (idx: number) => void // 删整张关键帧
|
||||
onDeleteGenerated?: (frameIdx: number, genId: string) => void // 删单张生成图
|
||||
onDeleteVideo?: (videoId: string) => void // 删 Video Gen 任务
|
||||
onOpenStoryboard?: (frameIdx: number) => void // 打开分镜头编排专属面板
|
||||
onOpenWorkbench?: (frameIdx?: number) => void // 展开顶部分镜编排内嵌面板
|
||||
onCopyImage?: (ref: ImageRef) => void // 复制图片到全局剪贴板(粘贴到分镜头编排插槽)
|
||||
@@ -982,6 +985,7 @@ export function VideoGenNode({ data, selected }: any) {
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
void navigator.clipboard?.writeText(v.prompt).catch(() => {})
|
||||
toast.success("已复制视频 prompt")
|
||||
}}
|
||||
title={`分镜 ${v.frame_idx + 1} · ${modelLabel(v.model)} · 点击复制 prompt`}
|
||||
className="absolute inset-0 w-full h-full overflow-hidden rounded-md bg-black"
|
||||
@@ -1023,6 +1027,29 @@ export function VideoGenNode({ data, selected }: any) {
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
void navigator.clipboard?.writeText(v.prompt).catch(() => {})
|
||||
toast.success("已复制视频 prompt")
|
||||
}}
|
||||
className="absolute left-1 top-1 z-[70] h-5 w-5 rounded-full bg-violet-500/90 text-white shadow-md backdrop-blur inline-flex items-center justify-center transition hover:bg-violet-400 hover:scale-110"
|
||||
title="复制视频 prompt"
|
||||
>
|
||||
<Copy className="h-2.5 w-2.5" />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
d.onDeleteVideo?.(v.id)
|
||||
}}
|
||||
className="absolute right-1 top-1 z-[70] h-5 w-5 rounded-full bg-rose-500/90 text-white shadow-md backdrop-blur inline-flex items-center justify-center transition hover:bg-rose-400 hover:scale-110"
|
||||
title="删除这个视频任务"
|
||||
>
|
||||
<Trash2 className="h-2.5 w-2.5" />
|
||||
</button>
|
||||
<div
|
||||
className="pointer-events-none absolute opacity-0 group-hover:opacity-100 scale-95 group-hover:scale-100 transition-all duration-150 z-[60]"
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user