From ce62d78b13e9a51e14231bb1ec1b88d539ee1a29 Mon Sep 17 00:00:00 2001 From: alethiophile Date: Sun, 7 May 2023 04:17:36 +0000 Subject: [PATCH] Fix some errors --- web/scripts/api.js | 2 -- web/scripts/ui.js | 10 ++++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/web/scripts/api.js b/web/scripts/api.js index 902155610..95861c03e 100644 --- a/web/scripts/api.js +++ b/web/scripts/api.js @@ -310,9 +310,7 @@ class ComfyApi extends EventTarget { // I'll just use client storage for now try { const r = load_saved(); - console.log("r is", r); return { Saved: Object.values(r).map((i) => { - console.log(i); i['remove'] = { name: "Delete", cb: () => { diff --git a/web/scripts/ui.js b/web/scripts/ui.js index 0decba04b..230d1d146 100644 --- a/web/scripts/ui.js +++ b/web/scripts/ui.js @@ -263,14 +263,18 @@ class ComfyList { async show() { this.element.style.display = "block"; - this.button.textContent = "Close"; + if (this.button) { + this.button.textContent = "Close"; + } await this.load(); } hide() { this.element.style.display = "none"; - this.button.textContent = "View " + this.#text; + if (this.button) { + this.button.textContent = "View " + this.#text; + } } toggle() { @@ -545,6 +549,7 @@ export class ComfyUI { }; list[name] = new_item; save_saved(list); + this.saved.update(); }, }), $el("button", { @@ -632,6 +637,7 @@ export class ComfyUI { }), ]); this.saved.show(); + this.saved.update(); const devMode = this.settings.addSetting({ id: "Comfy.DevMode",