Support new style menu

https://github.com/comfyanonymous/ComfyUI/pull/3112
This commit is contained in:
Dr.Lt.Data 2024-06-26 01:22:23 +09:00
parent e732255a23
commit d7f276726a
3 changed files with 16 additions and 2 deletions

View File

@ -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__), '..'))

View File

@ -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 = () => {

View File

@ -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"]