mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 07:30:11 +00:00
@@ -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() {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user