-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confirm delete workflow #1772
Confirm delete workflow #1772
Conversation
@huchenlei Can't seem to change the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's break this PR further down to following steps:
- Define a global confirmation dialog component that replaces the usage of
ComfyAsyncDialog
:ComfyUI_frontend/src/services/workflowService.ts
Lines 70 to 74 in d2771a7
const res = (await ComfyAsyncDialog.prompt({ title: 'Overwrite existing file?', message: `"${newPath}" already exists. Do you want to overwrite it?`, actions: ['Yes', 'No'] })) as 'Yes' | 'No' - Trigger the global dialog when the command is invoked.
This method does not require usage of PrimeVue's confirm popup component. Overall I think the floating dialog is more suitable for this kind of command confirmation, as it is not binded to specific way of interaction. Let's say the we invoke the command with keyboard, we would still want to see the confirmation, but there won't be a intuitive element to bind the popup.
fc99f89
to
ac9d5b3
Compare
5886add
to
8931796
Compare
Add workflow confirm delete
From context menu:
Confirm:
Setting - on by default:
Overwrite file dialog converted:
Close unsaved workflow converted: