mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-10 06:34:24 +08:00
improve: menu item layouts in new style menu
This commit is contained in:
parent
5dbe436ea9
commit
a539f6bbca
@ -23,7 +23,7 @@ sys.path.append(glob_path)
|
|||||||
import cm_global
|
import cm_global
|
||||||
from manager_util import *
|
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 '')
|
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1306,8 +1306,11 @@ app.registerExtension({
|
|||||||
menu.append(separator);
|
menu.append(separator);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// new style Manager button
|
// new style Manager buttons
|
||||||
app.menu?.saveButton.element.after(new(await import("../../scripts/ui/components/button.js")).ComfyButton({
|
|
||||||
|
// 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",
|
icon: "puzzle",
|
||||||
action: () => {
|
action: () => {
|
||||||
if(!manager_instance)
|
if(!manager_instance)
|
||||||
@ -1315,12 +1318,9 @@ app.registerExtension({
|
|||||||
manager_instance.show();
|
manager_instance.show();
|
||||||
},
|
},
|
||||||
tooltip: "ComfyUI Manager",
|
tooltip: "ComfyUI Manager",
|
||||||
content: "ComfyUI Manager",
|
content: "Manager",
|
||||||
classList: "comfyui-button comfyui-menu-mobile-collapse primary"
|
classList: "comfyui-button comfyui-menu-mobile-collapse primary"
|
||||||
}).element);
|
}).element,
|
||||||
|
|
||||||
// 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({
|
new(await import("../../scripts/ui/components/button.js")).ComfyButton({
|
||||||
icon: "vacuum-outline",
|
icon: "vacuum-outline",
|
||||||
action: () => {
|
action: () => {
|
||||||
@ -1333,7 +1333,28 @@ app.registerExtension({
|
|||||||
action: () => {
|
action: () => {
|
||||||
free_models(true);
|
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
|
}).element
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "comfyui-manager"
|
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."
|
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"
|
license = "LICENSE"
|
||||||
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]
|
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user