auto-save 2026-05-12 17:12 (~3)

This commit is contained in:
2026-05-12 17:12:16 +08:00
parent 94afd6d644
commit e1bc89a3b6
3 changed files with 21 additions and 5 deletions

View File

@@ -111,6 +111,13 @@
"message": "auto-save 2026-05-12 17:00 (~3)",
"hash": "4138bea",
"files_changed": 3
},
{
"ts": "2026-05-12T17:06:43+08:00",
"type": "commit",
"message": "auto-save 2026-05-12 17:06 (+1, ~3)",
"hash": "94afd6d",
"files_changed": 4
}
]
}

View File

@@ -141,8 +141,15 @@ export default function Home() {
}, [job?.id])
// 轮询 Jobdownloaded / transcribed / failed 三态停止)
const prevStatusRef = useRef<string | null>(null)
useEffect(() => {
if (!job) return
// 状态切到 downloaded 时提示用户点解析(仅一次)
if (job.status === "downloaded" && prevStatusRef.current !== "downloaded") {
toast.info("📥 视频已就绪 — 请点 Input 节点里的「点这里开始解析」按钮", { duration: 6000 })
}
prevStatusRef.current = job.status
const TERMINAL: Job["status"][] = ["downloaded", "transcribed", "failed"]
if (TERMINAL.includes(job.status)) {
if (pollRef.current) { clearInterval(pollRef.current); pollRef.current = null }

View File

@@ -141,14 +141,16 @@ export function InputNode({ data, selected }: NodeProps<{ data: NodeData }> | an
type="button"
disabled={isAnalyzing || d.analyzing}
onClick={d.onAnalyze}
className="mt-2 w-full text-[12px] py-2 rounded-md bg-gradient-to-r from-indigo-500 to-violet-500 text-white hover:opacity-95 disabled:opacity-40 disabled:cursor-not-allowed flex items-center justify-center gap-1.5 font-medium"
className={`mt-2 w-full text-[14px] py-3 rounded-md bg-gradient-to-r from-indigo-500 to-violet-500 text-white hover:opacity-95 disabled:opacity-40 disabled:cursor-not-allowed flex items-center justify-center gap-2 font-semibold shadow-lg shadow-violet-500/30 ${
!isAnalyzing && !d.analyzing && !isDone ? "animate-[pulse_2s_ease-in-out_infinite] ring-2 ring-violet-400/40 ring-offset-2 ring-offset-transparent" : ""
}`}
>
{(isAnalyzing || d.analyzing) ? (
<><Loader2 className="h-3.5 w-3.5 animate-spin" /> </>
<><Loader2 className="h-4 w-4 animate-spin" /> </>
) : isDone ? (
"重新解析"
) : (
"解析 →"
<> </>
)}
</button>
</>
@@ -265,10 +267,10 @@ export function KeyframeNode({ data, selected }: any) {
)}
<NodeShell
type="ai" status={st}
type="process" status={st}
icon={<ImageIcon className="h-4 w-4" />}
title="关键帧 · Keyframes"
subtitle={`STEP 4 · ${frames.length ? `${d.selectedFrames.size}/${frames.length} 选用` : "等待抽取"}`}
subtitle={`STEP 4 · ffmpeg · ${frames.length ? `${d.selectedFrames.size}/${frames.length} 选用` : "等待抽取"}`}
width={KEYFRAME_WIDTH}
selected={selected}
>