Default notifications for workflows

This commit is contained in:
space-nuko
2023-05-26 17:06:23 -05:00
parent 60bd989915
commit b3584dd2ad
9 changed files with 5772 additions and 5383 deletions

View File

@@ -54,6 +54,13 @@ export type WorkflowAttributes = {
* Comfy.QueueEvents node.
*/
queuePromptButtonRunWorkflow: boolean,
/*
* If true, notifications will be shown when a prompt is queued and
* completed. Set to false if you need more detailed control over the
* notification type/contents, and use the `ComfyNotifyAction` node instead.
*/
showDefaultNotifications: boolean,
}
export class ComfyBoxWorkflow {
@@ -217,7 +224,7 @@ export class ComfyBoxWorkflow {
// this.#invokeExtensions("loadedGraphNode", node);
}
this.attrs = data.attrs;
this.attrs = { ...defaultWorkflowAttributes, ...data.attrs };
// Now restore the layout
// Subsequent added nodes will add the UI data to layoutState