Migrate groupNodeManage (#36)

* rename

* Migrate node manager
This commit is contained in:
Chenlei Hu
2024-06-18 15:24:28 -04:00
committed by GitHub
parent e444a86ffe
commit 641c0fa01f
4 changed files with 32 additions and 24 deletions

View File

@@ -1,13 +1,13 @@
import { $el } from "../ui";
export class ComfyDialog {
element: HTMLElement;
export class ComfyDialog<T extends HTMLElement = HTMLElement> {
element: T;
textElement: HTMLElement;
constructor() {
this.element = $el("div.comfy-modal", { parent: document.body }, [
$el("div.comfy-modal-content", [$el("p", { $: (p) => (this.textElement = p) }), ...this.createButtons()]),
]);
]) as T;
}
createButtons() {

View File

@@ -27,11 +27,10 @@ interface SettingParams {
options?: SettingOption[] | ((value: any) => SettingOption[]);
}
export class ComfySettingsDialog extends ComfyDialog {
export class ComfySettingsDialog extends ComfyDialog<HTMLDialogElement> {
app: ComfyApp;
settingsValues: any;
settingsLookup: Record<string, Setting>;
declare element: HTMLDialogElement;
constructor(app) {
super();