Relands BetaUI (#77)

* PR1

* PR2

* pr3

* Fix

* Revert 3909

* Ignore/fix type errors

* Fix import
This commit is contained in:
Chenlei Hu
2024-07-01 18:07:12 -04:00
committed by GitHub
parent a26802fea6
commit 5f979e844c
37 changed files with 4135 additions and 470 deletions

View File

@@ -2,7 +2,7 @@ import { $el, ComfyDialog } from "../../scripts/ui";
import { DraggableList } from "../../scripts/ui/draggableList";
import { GroupNodeConfig, GroupNodeHandler } from "./groupNode";
import "./groupNodeManage.css";
import type { ComfyApp } from "/scripts/app";
import { app, type ComfyApp } from "../../scripts/app";
import type { LGraphNode, LGraphNodeConstructor } from "/types/litegraph";
@@ -317,6 +317,7 @@ export class ManageGroupDialog extends ComfyDialog<HTMLDialogElement> {
"button.comfy-btn",
{
onclick: (e) => {
// @ts-ignore
const node = app.graph._nodes.find((n) => n.type === "workflow/" + this.selectedGroup);
if (node) {
alert("This group node is in use in the current workflow, please first remove these.");
@@ -390,6 +391,7 @@ export class ManageGroupDialog extends ComfyDialog<HTMLDialogElement> {
types[g] = type;
if (!nodesByType) {
// @ts-ignore
nodesByType = app.graph._nodes.reduce((p, n) => {
p[n.type] ??= [];
p[n.type].push(n);