mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-09 06:04:31 +08:00
add favorites button
This commit is contained in:
parent
a952009d4a
commit
ecda9bd34e
@ -1499,7 +1499,6 @@ app.registerExtension({
|
||||
|
||||
try {
|
||||
// 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({
|
||||
@ -1513,6 +1512,19 @@ app.registerExtension({
|
||||
content: "Manager",
|
||||
classList: "comfyui-button comfyui-menu-mobile-collapse primary"
|
||||
}).element,
|
||||
new(await import("../../scripts/ui/components/button.js")).ComfyButton({
|
||||
icon: "star",
|
||||
action: () => {
|
||||
if(!manager_instance)
|
||||
setManagerInstance(new ManagerMenuDialog());
|
||||
|
||||
if(!CustomNodesManager.instance) {
|
||||
CustomNodesManager.instance = new CustomNodesManager(app, self);
|
||||
}
|
||||
CustomNodesManager.instance.show(CustomNodesManager.ShowMode.FAVORITES);
|
||||
},
|
||||
tooltip: "Show favorite custom node list"
|
||||
}).element,
|
||||
new(await import("../../scripts/ui/components/button.js")).ComfyButton({
|
||||
icon: "vacuum-outline",
|
||||
action: () => {
|
||||
|
||||
@ -780,13 +780,9 @@ export class CustomNodesManager {
|
||||
|
||||
let prevViewRowsLength = -1;
|
||||
grid.bind('onUpdated', (e, d) => {
|
||||
|
||||
const viewRows = grid.viewRows;
|
||||
if (viewRows.length !== prevViewRowsLength) {
|
||||
prevViewRowsLength = viewRows.length;
|
||||
this.showStatus(`${prevViewRowsLength.toLocaleString()} custom nodes`);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
grid.bind('onSelectChanged', (e, changes) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user