diff --git a/web/scripts/ui.js b/web/scripts/ui.js index 1a8fd9f1d..a51514b80 100644 --- a/web/scripts/ui.js +++ b/web/scripts/ui.js @@ -760,7 +760,7 @@ export class ComfyUI { id: "comfy-switch-workflow-combo", onchange: (event) => { app.switchWorkflow(event.target.selectedIndex); } - }, + }, [ $el("option", {value:'workflow_0'}, 'Workflow 0'), $el("option", {value:'workflow_1'}, 'Workflow 1'), @@ -827,9 +827,7 @@ export class ComfyUI { setStatus(status) { this.queueSize.textContent = "Queue size: " + (status ? status.exec_info.queue_remaining : "ERR"); - const switch_workflow_combo = document.getElementById("comfy-switch-workflow-combo"); if (status) { - switch_workflow_combo.disabled = status.exec_info.queue_remaining ? true : false; if ( this.lastQueueSize != 0 && status.exec_info.queue_remaining == 0 && @@ -839,11 +837,9 @@ export class ComfyUI { } this.lastQueueSize = status.exec_info.queue_remaining; } - else { - switch_workflow_combo.disabled = false; - } 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; const workflow_names = app.getWorkflowNames(); @@ -898,7 +894,7 @@ class RenameWorkflowDialog extends ComfyDialog { } this.workflow_names = updated_names; - + const switch_workflow_combo = document.getElementById("comfy-switch-workflow-combo"); const options = switch_workflow_combo.options; diff --git a/web/style.css b/web/style.css index dea670c36..11e2e7f1c 100644 --- a/web/style.css +++ b/web/style.css @@ -146,11 +146,6 @@ body { cursor: pointer; } -select#comfy-switch-workflow-combo:disabled { - filter: brightness(1.0); - cursor: not-allowed; -} - .comfy-menu select { text-align-last: center }