From d3b8162fafc73f0bf62d9d4c395433b459b8e748 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 20 Oct 2026 17:26:51 +0800 Subject: [PATCH] fix(canvas-agent): preserve production autosave confirmation --- components/canvas/LiblibVideoCanvasReplica.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/canvas/LiblibVideoCanvasReplica.tsx b/components/canvas/LiblibVideoCanvasReplica.tsx index 07ce2b0ef..9b68b7bf5 100644 --- a/components/canvas/LiblibVideoCanvasReplica.tsx +++ b/components/canvas/LiblibVideoCanvasReplica.tsx @@ -10984,7 +10984,7 @@ export function LiblibVideoCanvasReplica({ const panels: Record> = { assets: "assets", roles: "roleLibrary", styles: "styleLibrary", effects: "effectLibrary", history: "history", workflows: "workflow", share: "share", publish: "publish", skills: "skills", help: "help" }; if (panels[action]) { setActivePanel(panels[action]); return; } if (action.startsWith("upload-")) { addTargetModule(action === "upload-video" ? "video" : action === "upload-audio" ? "audio" : "image"); toast.message("已添加上传模块,请选择本机文件"); return; } - if (action === "save") { await saveCanvas(); return; } + if (action === "save") { if (!(await persistence.saveAndConfirm())) throw new Error("画布保存尚未确认,请稍后重试"); return; } if (action === "export") { const url = URL.createObjectURL(new Blob([JSON.stringify({ title: projectTitle, workspaceType: "video", canvasData: { nodes: serializeNodes(nodes), edges: serializeEdges(edges), viewport } }, null, 2)], { type: "application/json" })); const link = document.createElement("a"); link.href = url; link.download = `${projectTitle}.json`; link.click(); setTimeout(() => URL.revokeObjectURL(url), 1000); return;