mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 00:50:05 +00:00
Relands BetaUI (#77)
* PR1 * PR2 * pr3 * Fix * Revert 3909 * Ignore/fix type errors * Fix import
This commit is contained in:
@@ -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" } });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user