mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-05-10 17:12:43 +08:00
Fix deprecated ui.js import in common.js
This commit is contained in:
parent
336a945ff8
commit
fd8d458eaf
11
js/common.js
11
js/common.js
@ -1,8 +1,15 @@
|
||||
import { app } from "../../scripts/app.js";
|
||||
import { api } from "../../scripts/api.js";
|
||||
import { $el, ComfyDialog } from "../../scripts/ui.js";
|
||||
import { getBestPosition, getPositionStyle, getRect } from './popover-helper.js';
|
||||
|
||||
// === SHIM FOR NEW COMFYUI (removes ui.js warning) ===
|
||||
let $el, ComfyDialog;
|
||||
if (window?.comfyAPI?.ui) {
|
||||
({ $el, ComfyDialog } = window.comfyAPI.ui);
|
||||
} else {
|
||||
({ $el, ComfyDialog } = await import("../../scripts/ui.js"));
|
||||
}
|
||||
|
||||
|
||||
function internalCustomConfirm(message, confirmMessage, cancelMessage) {
|
||||
return new Promise((resolve) => {
|
||||
@ -667,4 +674,4 @@ function initTooltip () {
|
||||
document.body.addEventListener('mouseleave', mouseleaveHandler, true);
|
||||
}
|
||||
|
||||
initTooltip();
|
||||
initTooltip();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user