mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-09 12:54:40 +08:00
Fix deprecated js imports
This commit is contained in:
parent
1585f9b523
commit
836b4c3e41
@ -1,4 +1,4 @@
|
||||
import { app } from "../../../scripts/app.js";
|
||||
const { app } = window.comfyAPI.app;
|
||||
|
||||
app.registerExtension({
|
||||
name: "KJNodes.appearance",
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { api } from "../../../scripts/api.js";
|
||||
import { app } from "../../../scripts/app.js";
|
||||
const { api } = window.comfyAPI.api;
|
||||
const { app } = window.comfyAPI.app;
|
||||
|
||||
app.registerExtension({
|
||||
name: "KJNodes.browserstatus",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { app } from "../../../scripts/app.js";
|
||||
const { app } = window.comfyAPI.app;
|
||||
|
||||
// Adds context menu entries, code partly from pyssssscustom-scripts
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { app } from '../../../scripts/app.js'
|
||||
const { app } = window.comfyAPI.app;
|
||||
|
||||
//from melmass
|
||||
export function makeUUID() {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { app } from "../../../scripts/app.js";
|
||||
const { app } = window.comfyAPI.app;
|
||||
|
||||
// code based on mtb nodes by Mel Massadian https://github.com/melMass/comfy_mtb/
|
||||
export const loadScript = (
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { app } from "../../../scripts/app.js";
|
||||
import { applyTextReplacements } from "../../../scripts/utils.js";
|
||||
const { app } = window.comfyAPI.app;
|
||||
const { applyTextReplacements } = window.comfyAPI.utils;
|
||||
|
||||
app.registerExtension({
|
||||
name: "KJNodes.jsnodes",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { app } from '../../../scripts/app.js'
|
||||
const { app } = window.comfyAPI.app;
|
||||
|
||||
//from melmass
|
||||
export function makeUUID() {
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
import { app } from "../../../scripts/app.js";
|
||||
const { app } = window.comfyAPI.app;
|
||||
|
||||
//based on diffus3's SetGet: https://github.com/diffus3/ComfyUI-extensions
|
||||
|
||||
// Nodes that allow you to tunnel connections for cleaner graphs
|
||||
function setColorAndBgColor(type) {
|
||||
const colorMap = {
|
||||
"DEFAULT": LGraphCanvas.node_colors.gray,
|
||||
"MODEL": LGraphCanvas.node_colors.blue,
|
||||
"LATENT": LGraphCanvas.node_colors.purple,
|
||||
"VAE": LGraphCanvas.node_colors.red,
|
||||
"WANVAE": LGraphCanvas.node_colors.red,
|
||||
"CONDITIONING": LGraphCanvas.node_colors.brown,
|
||||
"IMAGE": LGraphCanvas.node_colors.pale_blue,
|
||||
"CLIP": LGraphCanvas.node_colors.yellow,
|
||||
@ -21,12 +23,17 @@ function setColorAndBgColor(type) {
|
||||
"SIGMAS": { color: "#485248", bgcolor: "#272e27"},
|
||||
|
||||
};
|
||||
|
||||
console.log("Setting color for type:", colorMap[type]);
|
||||
const colors = colorMap[type];
|
||||
if (colors) {
|
||||
this.color = colors.color;
|
||||
this.bgcolor = colors.bgcolor;
|
||||
}
|
||||
else{
|
||||
// Default color
|
||||
this.color = LGraphCanvas.node_colors.gray;
|
||||
this.bgcolor = LGraphCanvas.node_colors.gray;
|
||||
}
|
||||
}
|
||||
let disablePrefix = app.ui.settings.getSettingValue("KJNodes.disablePrefix")
|
||||
const LGraphNode = LiteGraph.LGraphNode
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { app } from '../../../scripts/app.js'
|
||||
const { app } = window.comfyAPI.app;
|
||||
|
||||
//from melmass
|
||||
export function makeUUID() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user