From 2ec11cb3b0ad3d6d9c9888a8f9a8a82dcbbc8b63 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Wed, 20 Mar 2024 19:13:43 +0000 Subject: [PATCH] prevent renaming unsaved --- web/scripts/ui/menu/workflows.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/scripts/ui/menu/workflows.js b/web/scripts/ui/menu/workflows.js index 418301cfe..47b7d3300 100644 --- a/web/scripts/ui/menu/workflows.js +++ b/web/scripts/ui/menu/workflows.js @@ -625,9 +625,10 @@ export class ComfyWorkflowsContent { #getRenameButton(workflow) { return new ComfyButton({ icon: "pencil", - tooltip: "Rename this workflow", + tooltip: workflow.path ? "Rename this workflow" : "This workflow can't be renamed as it hasn't been saved.", classList: "comfyui-button comfyui-workflows-file-action", iconSize: 18, + enabled: !!workflow.path, action: async (e) => { e.stopImmediatePropagation(); const newName = prompt("Enter new name", workflow.path);