mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-22 03:37:01 +08:00
prevent renaming unsaved
This commit is contained in:
parent
b9030c7281
commit
2ec11cb3b0
@ -625,9 +625,10 @@ export class ComfyWorkflowsContent {
|
|||||||
#getRenameButton(workflow) {
|
#getRenameButton(workflow) {
|
||||||
return new ComfyButton({
|
return new ComfyButton({
|
||||||
icon: "pencil",
|
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",
|
classList: "comfyui-button comfyui-workflows-file-action",
|
||||||
iconSize: 18,
|
iconSize: 18,
|
||||||
|
enabled: !!workflow.path,
|
||||||
action: async (e) => {
|
action: async (e) => {
|
||||||
e.stopImmediatePropagation();
|
e.stopImmediatePropagation();
|
||||||
const newName = prompt("Enter new name", workflow.path);
|
const newName = prompt("Enter new name", workflow.path);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user