From 7ff041902773abdba996042d7440a12c69a37aac Mon Sep 17 00:00:00 2001 From: JAlB- Date: Sat, 1 Apr 2023 22:41:05 +0300 Subject: [PATCH] Update WorkflowCollection.js --- web/scripts/WorkflowCollection.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/web/scripts/WorkflowCollection.js b/web/scripts/WorkflowCollection.js index cca77503d..8eb5f102d 100644 --- a/web/scripts/WorkflowCollection.js +++ b/web/scripts/WorkflowCollection.js @@ -23,6 +23,8 @@ class WC{ constructor(TARGET){ this.mainFrame = $Add('div', TARGET, {className : 'topMenu'}); + this.comfyMenuHidden = false; + this.loader = $Add("input", $d.body, { type: "file", accept: ".json", @@ -36,7 +38,7 @@ class WC{ this.Title = $Add('span', this.mainFrame, {innerHTML: 'ComfyUI', className : 'title'}); this.queuePanel = $Add('span', this.mainFrame, {style : {position: 'absolute', right: 0} } ); - this.queueInfoButton = $Add('span', this.queuePanel, {innerHTML : '≡', className : 'button'}); + this.queueInfoButton = $Add('span', this.queuePanel, {innerHTML : '≡', className : 'button', onclick : ()=>{this.showHideComfyMenu()} } ); this.generateButton = $Add('span', this.queuePanel, {innerHTML : 'GENERATE', className : 'button' , onclick : function(){app.queuePrompt(0, this.batchCount)} } ); this.controlPanel = $Add('span', this.mainFrame, {className : 'workflowControlPanel'}); @@ -70,6 +72,14 @@ class WC{ this.opened = true; //this.slide(); } + showHideComfyMenu(){ + if (this.comfyMenuHidden){ + qs('.comfy-menu').style.display = ''; + }else{ + qs('.comfy-menu').style.display = 'none'; + } + this.comfyMenuHidden = !this.comfyMenuHidden; + } slide(){ if (this.opened){ this.opened = !this.opened;