From 96ba2b4564262dcf54014aca719dedfdcf2606d8 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Mon, 24 Feb 2025 11:20:34 -0500 Subject: [PATCH] Allow quitting instant queue mode with the stop button (#2708) --- src/components/actionbar/ComfyQueueButton.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/actionbar/ComfyQueueButton.vue b/src/components/actionbar/ComfyQueueButton.vue index aa00114e6..4000b921c 100644 --- a/src/components/actionbar/ComfyQueueButton.vue +++ b/src/components/actionbar/ComfyQueueButton.vue @@ -50,7 +50,14 @@ :disabled="!hasPendingTasks" text :aria-label="$t('sideToolbar.queueTab.clearPendingTasks')" - @click="() => commandStore.execute('Comfy.ClearPendingTasks')" + @click=" + () => { + if (queueCountStore.count.value > 1) { + commandStore.execute('Comfy.ClearPendingTasks') + } + queueMode = 'disabled' + } + " /> @@ -113,7 +120,9 @@ const queueModeMenuItems = computed(() => ) const executingPrompt = computed(() => !!queueCountStore.count.value) -const hasPendingTasks = computed(() => queueCountStore.count.value > 1) +const hasPendingTasks = computed( + () => queueCountStore.count.value > 1 || queueMode.value !== 'disabled' +) const commandStore = useCommandStore() const queuePrompt = (e: MouseEvent) => {