fix(canvas-agent): preserve production autosave confirmation
This commit is contained in:
parent
ac54ade6b7
commit
d3b8162faf
@ -10984,7 +10984,7 @@ export function LiblibVideoCanvasReplica({
|
||||
const panels: Record<string, Exclude<ActivePanel, null>> = { 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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user