From 50ee923d66aea2133c8df25dfab7ef9168044087 Mon Sep 17 00:00:00 2001 From: of-HaiQin <5372604@qq.com> Date: Fri, 2 Aug 2024 16:50:05 +0800 Subject: [PATCH 1/2] [fix]import js error --- js/connection_color.js | 2 +- js/image_caption.js | 2 +- js/set_api_key.js | 2 +- js/showcases.js | 6 +++--- js/siliconcloud_llm_api.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/js/connection_color.js b/js/connection_color.js index 6b74134a..56fc8738 100644 --- a/js/connection_color.js +++ b/js/connection_color.js @@ -1,4 +1,4 @@ -import { app } from "../../../scripts/app.js"; +import { app } from "../../scripts/app.js"; app.registerExtension({ name: "bizyair.custom.connectionColorByType", diff --git a/js/image_caption.js b/js/image_caption.js index f5c42b76..4d295bd6 100644 --- a/js/image_caption.js +++ b/js/image_caption.js @@ -1,5 +1,5 @@ import { app } from "../../scripts/app.js"; -import { ComfyWidgets } from "../../../scripts/widgets.js"; +import { ComfyWidgets } from "../../scripts/widgets.js"; app.registerExtension({ name: "bizyair.image.to.caption", diff --git a/js/set_api_key.js b/js/set_api_key.js index 7ca8ca1d..bcd7d375 100644 --- a/js/set_api_key.js +++ b/js/set_api_key.js @@ -1,5 +1,5 @@ import { app } from "../../scripts/app.js"; -import { api } from "../../../../scripts/api.js"; +import { api } from "../../scripts/api.js"; app.registerExtension({ diff --git a/js/showcases.js b/js/showcases.js index 629225d7..a4305e92 100644 --- a/js/showcases.js +++ b/js/showcases.js @@ -1,6 +1,6 @@ -import { api } from "../../../../scripts/api.js"; -import { app } from "../../../scripts/app.js"; -import { $el } from "../../../scripts/ui.js"; +import { api } from "../../scripts/api.js"; +import { app } from "../../scripts/app.js"; +import { $el } from "../../scripts/ui.js"; const style = ` #comfy-floating-button { diff --git a/js/siliconcloud_llm_api.js b/js/siliconcloud_llm_api.js index f389e8ae..c7277688 100644 --- a/js/siliconcloud_llm_api.js +++ b/js/siliconcloud_llm_api.js @@ -1,5 +1,5 @@ import { app } from "../../scripts/app.js"; -import { ComfyWidgets } from "../../../scripts/widgets.js"; +import { ComfyWidgets } from "../../scripts/widgets.js"; app.registerExtension({ name: "bizyair.siliconcloud.llm.api", From d964e995b07e666fc36f13effc863b683d789f4b Mon Sep 17 00:00:00 2001 From: of-HaiQin <5372604@qq.com> Date: Wed, 7 Aug 2024 18:15:28 +0800 Subject: [PATCH 2/2] [feat]optimize window.open set api key url --- js/set_api_key.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/set_api_key.js b/js/set_api_key.js index bcd7d375..218c600e 100644 --- a/js/set_api_key.js +++ b/js/set_api_key.js @@ -32,8 +32,7 @@ app.registerExtension({ BizyAir_SetAPIKey.style.borderRadius = "12px"; // 动态获取当前页面的协议、地址和端口 - const currentUrl = window.location.protocol + "//" + window.location.host; - const apiKeyUrl = currentUrl + "/bizyair/set-api-key"; + const apiKeyUrl = `${location.href}/bizyair/set-api-key`; // 设置按钮点击事件 BizyAir_SetAPIKey.onclick = () => {