mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-05-10 09:02:30 +08:00
Fix deprecated ui.js import in snapshot.js
This commit is contained in:
parent
edb0918fb8
commit
30b99df8bc
@ -1,9 +1,16 @@
|
||||
import { app } from "../../scripts/app.js";
|
||||
import { api } from "../../scripts/api.js"
|
||||
import { ComfyDialog, $el } from "../../scripts/ui.js";
|
||||
import { manager_instance, rebootAPI, show_message, handle403Response, loadCss } from "./common.js";
|
||||
import { buildGuiFrame } from "./comfyui-gui-builder.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("./snapshot.css");
|
||||
|
||||
async function restore_snapshot(target) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user