mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-05-10 00:52:32 +08:00
Fix deprecated ui.js import in custom-nodes-manager.js
This commit is contained in:
parent
8f1b4ea47b
commit
439aeaed3b
@ -1,5 +1,4 @@
|
||||
import { app } from "../../scripts/app.js";
|
||||
import { ComfyDialog, $el } from "../../scripts/ui.js";
|
||||
import { api } from "../../scripts/api.js";
|
||||
import { buildGuiFrameCustomHeader, createSettingsCombo } from "./comfyui-gui-builder.js";
|
||||
|
||||
@ -14,6 +13,14 @@ import {
|
||||
// https://cenfun.github.io/turbogrid/api.html
|
||||
import TG from "./turbogrid.esm.js";
|
||||
|
||||
// === SHIM FOR NEW COMFYUI (removes ui.js warning) ===
|
||||
let ComfyDialog, $el;
|
||||
if (window?.comfyAPI?.ui) {
|
||||
({ ComfyDialog, $el } = window.comfyAPI.ui);
|
||||
} else {
|
||||
({ ComfyDialog, $el } = await import("../../scripts/ui.js"));
|
||||
}
|
||||
|
||||
loadCss("./custom-nodes-manager.css");
|
||||
|
||||
const gridId = "node";
|
||||
@ -2245,4 +2252,4 @@ export class CustomNodesManager {
|
||||
get isVisible() {
|
||||
return this.element?.style?.display !== "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user