diff --git a/.memory/worklog.json b/.memory/worklog.json index 89bb429..08f699e 100644 --- a/.memory/worklog.json +++ b/.memory/worklog.json @@ -251,6 +251,13 @@ "message": "auto-save 2026-05-12 19:25 (~4)", "hash": "c159668", "files_changed": 4 + }, + { + "ts": "2026-05-12T19:31:21+08:00", + "type": "commit", + "message": "auto-save 2026-05-12 19:31 (~2)", + "hash": "ecef988", + "files_changed": 2 } ] } diff --git a/web/components/dashboard.tsx b/web/components/dashboard.tsx index 2dc7de0..ab98102 100644 --- a/web/components/dashboard.tsx +++ b/web/components/dashboard.tsx @@ -297,7 +297,7 @@ export function Dashboard({ data }: Props) { > )} - {/* ---- Download — Kanban ---- */} + {/* ---- Download — 只显示元数据,视频播放器移到 Keyframe section ---- */} {key === "download" && ( !hasVideo ? ( @@ -305,20 +305,19 @@ export function Dashboard({ data }: Props) { ) : ( <> - - setVideoT((e.target as HTMLVideoElement).currentTime)} - className="block w-full bg-black rounded-md mt-1" - /> + + + {job!.url.startsWith("upload://") ? `📎 ${job!.url.slice(9)}` : `🔗 ${job!.url}`} + 分辨率{job!.width}×{job!.height} 时长{job!.duration.toFixed(1)}s - 来源{job!.url.startsWith("upload://") ? "上传" : "TK"} + 大小~9MB + + + 要看视频 / 选帧请打开「关键帧」 > @@ -340,25 +339,40 @@ export function Dashboard({ data }: Props) { > )} - {/* ---- Keyframe — Kanban 卡片 ---- */} + {/* ---- Keyframe — Kanban 卡片(视频播放器 + 加帧 + 缩略图都在这里) ---- */} {key === "keyframe" && ( {hasVideo && job && ( - - { - const t = videoRef.current?.currentTime ?? videoT - setAddingFrame(true) - try { await data.onAddManualFrame(t) } finally { setAddingFrame(false) } - }} - className="mt-1 w-full text-[12px] py-1.5 rounded-md bg-emerald-500 hover:bg-emerald-400 text-white disabled:opacity-50 inline-flex items-center justify-center gap-1.5" - > - {addingFrame ? : } - {addingFrame ? "抽帧中…" : `把 ${videoT.toFixed(1)}s 加为关键帧`} - - + <> + + setVideoT((e.target as HTMLVideoElement).currentTime)} + className="block w-full bg-black rounded-md mt-1" + /> + + 当前 {videoT.toFixed(2)}s + {job.width}×{job.height} · {job.duration.toFixed(1)}s + + + + { + const t = videoRef.current?.currentTime ?? videoT + setAddingFrame(true) + try { await data.onAddManualFrame(t) } finally { setAddingFrame(false) } + }} + className="mt-1 w-full text-[12.5px] py-2 rounded-md bg-emerald-500 hover:bg-emerald-400 text-white disabled:opacity-50 inline-flex items-center justify-center gap-1.5 font-medium" + > + {addingFrame ? : } + {addingFrame ? "抽帧中…" : `+ 把 ${videoT.toFixed(1)}s 加为关键帧`} + + + > )} {!hasFrames ? ( diff --git a/web/components/nodes/index.tsx b/web/components/nodes/index.tsx index b61456b..1e42e83 100644 --- a/web/components/nodes/index.tsx +++ b/web/components/nodes/index.tsx @@ -128,46 +128,19 @@ export function InputNode({ data, selected }: NodeProps<{ data: NodeData }> | an > )} - {/* 已下载:内嵌视频 + 解析按钮 */} + {/* 已下载:仅元数据 + 解析按钮(视频播放器和加帧 controls 在左侧看板 Keyframe section) */} {hasVideo && job && ( <> - setVideoT((e.target as HTMLVideoElement).currentTime)} - className="w-full aspect-video rounded-md bg-black border border-black/10 dark:border-white/10" - /> - - {job.width}×{job.height} · {job.duration.toFixed(1)}s - - {job.url.startsWith("upload://") ? `📎 ${job.url.slice(9)}` : "🔗"} - + + + 视频已下载 + {job.url.startsWith("upload://") ? "📎 上传" : "🔗 链接"} + + + {job.width}×{job.height} · {job.duration.toFixed(1)}s + - {/* 手动拖加帧(已抽过帧才出现) */} - {hasFrames && ( - { - e.stopPropagation() - const t = videoRef.current?.currentTime ?? 0 - setAddingFrame(true) - try { - await d.onAddManualFrame(t) - } finally { - setAddingFrame(false) - } - }} - className="mt-2 w-full text-[11.5px] py-2 rounded-md border border-dashed border-emerald-400/40 bg-emerald-400/5 hover:bg-emerald-400/10 text-emerald-300 dark:text-emerald-300 disabled:opacity-50 flex items-center justify-center gap-1.5" - title="把视频当前播放时间点的画面加为新关键帧" - > - {addingFrame ? : } - {addingFrame ? "抽帧中…" : `+ 把 ${videoT.toFixed(1)}s 这一帧加为关键帧`} - - )} -