Use new TS frontend uncompressed (#4379)
* Swap frontend uncompressed * Add uncompressed files
This commit is contained in:
25
web/scripts/ui/menu/interruptButton.js
vendored
25
web/scripts/ui/menu/interruptButton.js
vendored
@@ -1,23 +1,2 @@
|
||||
// @ts-check
|
||||
|
||||
import { api } from "../../api.js";
|
||||
import { ComfyButton } from "../components/button.js";
|
||||
|
||||
export function getInteruptButton(visibility) {
|
||||
const btn = new ComfyButton({
|
||||
icon: "close",
|
||||
tooltip: "Cancel current generation",
|
||||
enabled: false,
|
||||
action: () => {
|
||||
api.interrupt();
|
||||
},
|
||||
classList: ["comfyui-button", "comfyui-interrupt-button", visibility],
|
||||
});
|
||||
|
||||
api.addEventListener("status", ({ detail }) => {
|
||||
const sz = detail?.exec_info?.queue_remaining;
|
||||
btn.enabled = sz > 0;
|
||||
});
|
||||
|
||||
return btn;
|
||||
}
|
||||
// Shim for scripts\ui\menu\interruptButton.ts
|
||||
export const getInterruptButton = window.comfyAPI.interruptButton.getInterruptButton;
|
||||
|
||||
Reference in New Issue
Block a user