Ask for confirmation before clearing nodes

This commit is contained in:
City 2023-04-04 18:16:23 +02:00
parent 1718730e80
commit 080c758cda

View File

@ -510,6 +510,7 @@ export class ComfyUI {
$el("button", { textContent: "Load", onclick: () => fileInput.click() }),
$el("button", { textContent: "Refresh", onclick: () => app.refreshComboInNodes() }),
$el("button", { textContent: "Clear", onclick: () => {
if (!confirm("Are you sure you want to remove all nodes?")) return;
app.clean();
app.graph.clear();
}}),