"git@developer.sourcefind.cn:chenpangpang/ComfyUI.git" did not exist on "c8c9926eeb0b25dba86f3d9e574e8527c090fc37"
Commit 451447bd authored by comfyanonymous's avatar comfyanonymous
Browse files

Merge branch 'saveimage' of https://github.com/pythongosssss/ComfyUI

parents 49705dc9 0b6ba21f
...@@ -80,10 +80,23 @@ class ComfyApp { ...@@ -80,10 +80,23 @@ class ComfyApp {
img = this.imgs[this.overIndex]; img = this.imgs[this.overIndex];
} }
if (img) { if (img) {
options.unshift({ options.unshift(
content: "Open Image", {
callback: () => window.open(img.src, "_blank"), content: "Open Image",
}); callback: () => window.open(img.src, "_blank"),
},
{
content: "Save Image",
callback: () => {
const a = document.createElement("a");
a.href = img.src;
a.setAttribute("download", new URLSearchParams(new URL(img.src).search).get("filename"));
document.body.append(a);
a.click();
requestAnimationFrame(() => a.remove());
},
}
);
} }
} }
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment