Skip to content

Commit

Permalink
improve: menu item layouts in new style menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ltdrdata committed Jul 7, 2024
1 parent 5dbe436 commit a539f6b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 15 deletions.
2 changes: 1 addition & 1 deletion glob/manager_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import cm_global
from manager_util import *

version = [2, 45, 1]
version = [2, 46]
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')


Expand Down
47 changes: 34 additions & 13 deletions js/comfyui-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1306,21 +1306,21 @@ app.registerExtension({
menu.append(separator);

try {
// 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);
// new style Manager buttons

// unload models button into new style Manager button
let cmGroup = new (await import("../../scripts/ui/components/buttonGroup.js")).ComfyButtonGroup(
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: "Manager",
classList: "comfyui-button comfyui-menu-mobile-collapse primary"
}).element,
new(await import("../../scripts/ui/components/button.js")).ComfyButton({
icon: "vacuum-outline",
action: () => {
Expand All @@ -1333,7 +1333,28 @@ app.registerExtension({
action: () => {
free_models(true);
},
tooltip: "Unload Whole Cache"
tooltip: "Free model and node cache"
}).element,
new(await import("../../scripts/ui/components/button.js")).ComfyButton({
icon: "share",
action: () => {
if (share_option === 'openart') {
showOpenArtShareDialog();
return;
} else if (share_option === 'matrix' || share_option === 'comfyworkflows') {
showShareDialog(share_option);
return;
} else if (share_option === 'youml') {
showYouMLShareDialog();
return;
}

if(!ShareDialogChooser.instance) {
ShareDialogChooser.instance = new ShareDialogChooser();
}
ShareDialogChooser.instance.show();
},
tooltip: "Share"
}).element
);

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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.45.1"
version = "2.46"
license = "LICENSE"
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]

Expand Down

0 comments on commit a539f6b

Please sign in to comment.