mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-13 15:02:37 +08:00
disable the workflow locking
This commit is contained in:
parent
861150d131
commit
08e435504a
@ -760,7 +760,7 @@ export class ComfyUI {
|
|||||||
id: "comfy-switch-workflow-combo", onchange: (event) => {
|
id: "comfy-switch-workflow-combo", onchange: (event) => {
|
||||||
app.switchWorkflow(event.target.selectedIndex);
|
app.switchWorkflow(event.target.selectedIndex);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
$el("option", {value:'workflow_0'}, 'Workflow 0'),
|
$el("option", {value:'workflow_0'}, 'Workflow 0'),
|
||||||
$el("option", {value:'workflow_1'}, 'Workflow 1'),
|
$el("option", {value:'workflow_1'}, 'Workflow 1'),
|
||||||
@ -827,9 +827,7 @@ export class ComfyUI {
|
|||||||
|
|
||||||
setStatus(status) {
|
setStatus(status) {
|
||||||
this.queueSize.textContent = "Queue size: " + (status ? status.exec_info.queue_remaining : "ERR");
|
this.queueSize.textContent = "Queue size: " + (status ? status.exec_info.queue_remaining : "ERR");
|
||||||
const switch_workflow_combo = document.getElementById("comfy-switch-workflow-combo");
|
|
||||||
if (status) {
|
if (status) {
|
||||||
switch_workflow_combo.disabled = status.exec_info.queue_remaining ? true : false;
|
|
||||||
if (
|
if (
|
||||||
this.lastQueueSize != 0 &&
|
this.lastQueueSize != 0 &&
|
||||||
status.exec_info.queue_remaining == 0 &&
|
status.exec_info.queue_remaining == 0 &&
|
||||||
@ -839,11 +837,9 @@ export class ComfyUI {
|
|||||||
}
|
}
|
||||||
this.lastQueueSize = status.exec_info.queue_remaining;
|
this.lastQueueSize = status.exec_info.queue_remaining;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
switch_workflow_combo.disabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.is_launchTiming && typeof app != "undefined") {
|
if (this.is_launchTiming && typeof app != "undefined") {
|
||||||
|
const switch_workflow_combo = document.getElementById("comfy-switch-workflow-combo");
|
||||||
switch_workflow_combo.selectedIndex = app.workflow_current_id;
|
switch_workflow_combo.selectedIndex = app.workflow_current_id;
|
||||||
|
|
||||||
const workflow_names = app.getWorkflowNames();
|
const workflow_names = app.getWorkflowNames();
|
||||||
@ -898,7 +894,7 @@ class RenameWorkflowDialog extends ComfyDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.workflow_names = updated_names;
|
this.workflow_names = updated_names;
|
||||||
|
|
||||||
const switch_workflow_combo = document.getElementById("comfy-switch-workflow-combo");
|
const switch_workflow_combo = document.getElementById("comfy-switch-workflow-combo");
|
||||||
const options = switch_workflow_combo.options;
|
const options = switch_workflow_combo.options;
|
||||||
|
|
||||||
|
|||||||
@ -146,11 +146,6 @@ body {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
select#comfy-switch-workflow-combo:disabled {
|
|
||||||
filter: brightness(1.0);
|
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
|
||||||
|
|
||||||
.comfy-menu select {
|
.comfy-menu select {
|
||||||
text-align-last: center
|
text-align-last: center
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user