Relands BetaUI (#77)

* PR1

* PR2

* pr3

* Fix

* Revert 3909

* Ignore/fix type errors

* Fix import
This commit is contained in:
Chenlei Hu
2024-07-01 18:07:12 -04:00
committed by GitHub
parent a26802fea6
commit 5f979e844c
37 changed files with 4135 additions and 470 deletions

View File

@@ -104,6 +104,8 @@ function dragElement(dragEl, settings) {
}
function positionElement() {
if (dragEl.style.display === "none") return;
const halfWidth = document.body.clientWidth / 2;
const anchorRight = newPosX + dragEl.clientWidth / 2 > halfWidth;
@@ -193,6 +195,8 @@ function dragElement(dragEl, settings) {
document.onmouseup = null;
document.onmousemove = null;
}
return restorePos;
}
class ComfyList {
@@ -390,6 +394,9 @@ export class ComfyUI {
},
}) as HTMLInputElement;
// @ts-ignore
this.loadFile = () => fileInput.click();
const autoQueueModeEl = toggleSwitch(
"autoQueueMode",
[
@@ -645,10 +652,11 @@ export class ComfyUI {
name: "Enable Dev mode Options",
type: "boolean",
defaultValue: false,
onChange: function (value) { document.getElementById("comfy-dev-save-api-button").style.display = value ? "block" : "none" },
onChange: function (value) { document.getElementById("comfy-dev-save-api-button").style.display = value ? "flex" : "none" },
});
dragElement(this.menuContainer, this.settings);
// @ts-ignore
this.restoreMenuPosition = dragElement(this.menuContainer, this.settings);
this.setStatus({ exec_info: { queue_remaining: "X" } });
}