Allow quitting instant queue mode with the stop button (#2708)

This commit is contained in:
Chenlei Hu
2025-02-24 11:20:34 -05:00
committed by GitHub
parent 05bd64820d
commit 96ba2b4564

View File

@@ -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'
}
"
/>
</ButtonGroup>
</div>
@@ -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) => {