Tha gallery widget

This commit is contained in:
space-nuko
2023-04-07 12:13:03 -05:00
parent eed4e29004
commit f40e46d0c2
18 changed files with 246 additions and 40 deletions

View File

@@ -60,14 +60,14 @@ export default class ComfyAPI extends EventTarget {
let opened = false;
let existingSession = sessionStorage["Comfy.SessionId"] || "";
if (existingSession) {
existingSession = "/" + existingSession;
existingSession = "?clientId=" + existingSession;
}
const hostname = this.hostname || location.hostname;
const port = this.port || location.port;
this.socket = new WebSocket(
`ws${window.location.protocol === "https:" ? "s" : ""}://${hostname}:${port}/ws?clientId=${existingSession}`
`ws${window.location.protocol === "https:" ? "s" : ""}://${hostname}:${port}/ws${existingSession}`
);
this.socket.addEventListener("open", () => {