From d7f276726aa6a30b79a67087aea1bc77ae80644f Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Wed, 26 Jun 2024 01:22:23 +0900 Subject: [PATCH] Support new style menu https://github.com/comfyanonymous/ComfyUI/pull/3112 --- glob/manager_core.py | 2 +- js/comfyui-manager.js | 14 ++++++++++++++ pyproject.toml | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/glob/manager_core.py b/glob/manager_core.py index becd09f9..3d204393 100644 --- a/glob/manager_core.py +++ b/glob/manager_core.py @@ -23,7 +23,7 @@ sys.path.append(glob_path) import cm_global from manager_util import * -version = [2, 41] +version = [2, 42] version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '') comfyui_manager_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) diff --git a/js/comfyui-manager.js b/js/comfyui-manager.js index f6ab968b..4ad3999e 100644 --- a/js/comfyui-manager.js +++ b/js/comfyui-manager.js @@ -1278,6 +1278,20 @@ app.registerExtension({ separator.style.width = "100%"; menu.append(separator); + // new style Manager button + app.menu?.saveButton.element.after(new(await import("../../scripts/ui/components/button.js")).ComfyButton({ + icon: "puzzle", + action: () => { + if(!manager_instance) + setManagerInstance(new ManagerMenuDialog()); + manager_instance.show(); + }, + tooltip: "ComfyUI Manager", + content: "ComfyUI Manager", + classList: "comfyui-button comfyui-menu-mobile-collapse primary" + }).element); + + // old style Manager button const managerButton = document.createElement("button"); managerButton.textContent = "Manager"; managerButton.onclick = () => { diff --git a/pyproject.toml b/pyproject.toml index 21d12cb4..9e28c08b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-manager" description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI." -version = "2.41" +version = "2.42" license = "LICENSE" dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]