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 {
|
try {
|
||||||
// new style Manager buttons
|
// new style Manager buttons
|
||||||
|
|
||||||
// unload models button into new style Manager button
|
// unload models button into new style Manager button
|
||||||
let cmGroup = new (await import("../../scripts/ui/components/buttonGroup.js")).ComfyButtonGroup(
|
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({
|
||||||
@ -1513,6 +1512,19 @@ app.registerExtension({
|
|||||||
content: "Manager",
|
content: "Manager",
|
||||||
classList: "comfyui-button comfyui-menu-mobile-collapse primary"
|
classList: "comfyui-button comfyui-menu-mobile-collapse primary"
|
||||||
}).element,
|
}).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({
|
new(await import("../../scripts/ui/components/button.js")).ComfyButton({
|
||||||
icon: "vacuum-outline",
|
icon: "vacuum-outline",
|
||||||
action: () => {
|
action: () => {
|
||||||
|
|||||||
@ -780,13 +780,9 @@ export class CustomNodesManager {
|
|||||||
|
|
||||||
let prevViewRowsLength = -1;
|
let prevViewRowsLength = -1;
|
||||||
grid.bind('onUpdated', (e, d) => {
|
grid.bind('onUpdated', (e, d) => {
|
||||||
|
|
||||||
const viewRows = grid.viewRows;
|
const viewRows = grid.viewRows;
|
||||||
if (viewRows.length !== prevViewRowsLength) {
|
prevViewRowsLength = viewRows.length;
|
||||||
prevViewRowsLength = viewRows.length;
|
this.showStatus(`${prevViewRowsLength.toLocaleString()} custom nodes`);
|
||||||
this.showStatus(`${prevViewRowsLength.toLocaleString()} custom nodes`);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
grid.bind('onSelectChanged', (e, changes) => {
|
grid.bind('onSelectChanged', (e, changes) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user