Workflow title

This commit is contained in:
space-nuko
2023-05-20 20:46:36 -05:00
parent 1ca069b35f
commit 8d031120f7
6 changed files with 55 additions and 26 deletions

View File

@@ -80,6 +80,8 @@ export type SerializedAppState = {
commitHash?: string,
/** Graph state */
workflow: SerializedLGraph,
/** Workflow name */
workflowName: string,
/** UI state */
layout: SerializedLayoutState,
/** Position/offset of the canvas at the time of saving */
@@ -197,7 +199,7 @@ export default class ComfyApp {
// We failed to restore a workflow so load the default
if (!restored) {
await this.initDefaultGraph();
await this.initDefaultWorkflow();
}
workflowState.createNewWorkflow(this.lCanvas);
@@ -522,7 +524,12 @@ export default class ComfyApp {
selectionState.clear();
}
async initDefaultGraph() {
closeWorkflow(index: number) {
workflowState.closeWorkflow(this.lCanvas, index);
selectionState.clear();
}
async initDefaultWorkflow() {
let state = null;
try {
const graphResponse = await fetch("/workflows/defaultWorkflow.json");