diff --git a/js/comfyui-share-openart.js b/js/comfyui-share-openart.js index 1c96a8c7..3b9ed484 100644 --- a/js/comfyui-share-openart.js +++ b/js/comfyui-share-openart.js @@ -1,8 +1,15 @@ import {app} from "../../scripts/app.js"; import {api} from "../../scripts/api.js"; -import {ComfyDialog, $el} from "../../scripts/ui.js"; import { customAlert } from "./common.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")); +} + const LOCAL_STORAGE_KEY = "openart_comfy_workflow_key"; const DEFAULT_HOMEPAGE_URL = "https://openart.ai/workflows/dev?developer=true"; //const DEFAULT_HOMEPAGE_URL = "http://localhost:8080/workflows/dev?developer=true";