auto-save 2026-05-14 03:42 (~3)

This commit is contained in:
2026-05-14 03:42:50 +08:00
parent 26a43fc9a0
commit 3b1ab39201
3 changed files with 52 additions and 8 deletions

View File

@@ -458,10 +458,10 @@ export function InputNode({ data, selected }: NodeProps<{ data: NodeData }> | an
type="button"
onClick={(e) => {
e.stopPropagation()
// 单击:钉住 / 取消钉住大预览 + 切换 active若需要
const anchor = canvasThumbnailAnchor(rootRef.current, e.currentTarget)
setPinnedPreviewJob((prev) => (prev?.id === j.id ? null : { id: j.id, ...anchor }))
if (!isActive && ready) d.onSwitchJob(j.id)
if (!ready) return
setPinnedPreviewJob(null)
if (!isActive) d.onSwitchJob(j.id)
d.onOpenVideoPanel?.(j.id)
}}
onDoubleClick={(e) => {
e.stopPropagation()
@@ -471,7 +471,7 @@ export function InputNode({ data, selected }: NodeProps<{ data: NodeData }> | an
d.onOpenVideoPanel?.(j.id)
}
}}
title={ready ? `${j.width}×${j.height} · ${(j.duration ?? 0).toFixed(1)}s · 单击钉住大预览 · 双击打开抽帧面板` : "下载中…"}
title={ready ? `${j.width}×${j.height} · ${(j.duration ?? 0).toFixed(1)}s · 单击打开抽帧面板` : "下载中…"}
className="absolute inset-0 w-full h-full overflow-hidden rounded-md"
>
{ready ? (
@@ -747,7 +747,10 @@ export function VideoFramePanelNode({ data }: any) {
boxShadow: "0 30px 80px -20px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.05)",
}}
>
<div className={`video-frame-panel-drag flex h-7 items-center justify-between bg-gradient-to-r from-indigo-500 to-violet-500 px-3 text-white ${docked ? "cursor-default" : "cursor-move"}`}>
<div
className={`video-frame-panel-drag flex h-7 items-center justify-between px-3 text-white ${docked ? "cursor-default" : "cursor-move"}`}
style={{ background: "var(--grad-input)" }}
>
<div className="flex min-w-0 items-center gap-2">
<FileVideo className="h-3.5 w-3.5 shrink-0" />
<span className="truncate text-[12px] font-semibold"> · Input</span>
@@ -792,6 +795,7 @@ export function VideoFramePanelNode({ data }: any) {
src={videoUrl(panelJob.id)}
controls
autoPlay
muted
playsInline
preload="auto"
onTimeUpdate={(e) => setCurrentT((e.target as HTMLVideoElement).currentTime)}
@@ -1583,7 +1587,10 @@ export function KeyframePanelNode({ data }: any) {
boxShadow: "0 30px 80px -20px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.05)",
}}
>
<div className={`keyframe-panel-drag flex h-7 items-center justify-between bg-gradient-to-r from-indigo-500 to-violet-500 px-3 text-white ${docked ? "cursor-default" : "cursor-move"}`}>
<div
className={`keyframe-panel-drag flex h-7 items-center justify-between px-3 text-white ${docked ? "cursor-default" : "cursor-move"}`}
style={{ background: "var(--grad-ai)" }}
>
<div className="flex min-w-0 items-center gap-2">
<ImageIcon className="h-3.5 w-3.5 shrink-0" />
<span className="truncate text-[12px] font-semibold"> · </span>
@@ -1687,7 +1694,7 @@ export function KeyframePanelNode({ data }: any) {
<button
type="button"
onPointerDown={startResize}
className="nodrag absolute bottom-0 right-0 z-[5] h-7 w-7 cursor-nwse-resize rounded-tl-md bg-white/10 text-white/65 hover:bg-violet-400/35 hover:text-white inline-flex items-center justify-center"
className="nodrag absolute bottom-0 right-0 z-[5] h-7 w-7 cursor-nwse-resize rounded-tl-md bg-white/10 text-white/65 hover:bg-pink-400/35 hover:text-white inline-flex items-center justify-center"
title="拖动右下角缩放面板"
>
<Maximize2 className="h-3.5 w-3.5" />