diff --git a/src/components/actionbar/ComfyActionbar.vue b/src/components/actionbar/ComfyActionbar.vue
index 1d24e48385e..f488d6710c2 100644
--- a/src/components/actionbar/ComfyActionbar.vue
+++ b/src/components/actionbar/ComfyActionbar.vue
@@ -41,6 +41,17 @@
>
+
@@ -65,17 +76,22 @@ import { useSettingStore } from '@/platform/settings/settingStore'
import { useTelemetry } from '@/platform/telemetry'
import { useCommandStore } from '@/stores/commandStore'
import { useExecutionStore } from '@/stores/executionStore'
+import { useQueueStore } from '@/stores/queueStore'
import { cn } from '@/utils/tailwindUtil'
import ComfyRunButton from './ComfyRunButton'
const settingsStore = useSettingStore()
const commandStore = useCommandStore()
+const { hasPendingTasks } = storeToRefs(useQueueStore())
const { t } = useI18n()
const { isIdle: isExecutionIdle } = storeToRefs(useExecutionStore())
const position = computed(() => settingsStore.get('Comfy.UseNewMenu'))
const visible = computed(() => position.value !== 'Disabled')
+const showClearPendingTasksButton = computed(() =>
+ settingsStore.get('Comfy.Menu.ShowClearPendingTasksButton')
+)
const tabContainer = document.querySelector('.workflow-tabs-container')
const panelRef = ref(null)
@@ -286,6 +302,10 @@ const cancelCurrentJob = async () => {
await commandStore.execute('Comfy.Interrupt')
}
+const clearPendingTasksTooltipConfig = computed(() =>
+ buildTooltipConfig(t('menuLabels.Clear Pending Tasks'))
+)
+
const actionbarClass = computed(() =>
cn(
'w-[200px] border-dashed border-blue-500 opacity-80',
diff --git a/src/locales/en/settings.json b/src/locales/en/settings.json
index 2323be63e1b..6fc0c76731f 100644
--- a/src/locales/en/settings.json
+++ b/src/locales/en/settings.json
@@ -372,6 +372,10 @@
"Top": "Top"
}
},
+ "Comfy_Menu_ShowClearPendingTasksButton": {
+ "name": "Show clear pending tasks button in action bar",
+ "tooltip": "Adds a clear pending tasks button to the action bar."
+ },
"Comfy_Validation_Workflows": {
"name": "Validate workflows"
},
@@ -455,4 +459,4 @@
"pysssss_SnapToGrid": {
"name": "Always snap to grid"
}
-}
\ No newline at end of file
+}
diff --git a/src/platform/settings/constants/coreSettings.ts b/src/platform/settings/constants/coreSettings.ts
index 85032dcdf48..3449264bdd8 100644
--- a/src/platform/settings/constants/coreSettings.ts
+++ b/src/platform/settings/constants/coreSettings.ts
@@ -566,6 +566,14 @@ export const CORE_SETTINGS: SettingParams[] = [
return value
}
},
+ {
+ id: 'Comfy.Menu.ShowClearPendingTasksButton',
+ category: ['Comfy', 'Menu', 'ShowClearPendingTasksButton'],
+ defaultValue: false,
+ name: 'Show clear pending tasks button in action bar',
+ type: 'boolean',
+ tooltip: 'Adds a clear pending tasks button to the action bar.'
+ },
{
id: 'Comfy.Workflow.WorkflowTabsPosition',
name: 'Opened workflows position',
diff --git a/src/schemas/apiSchema.ts b/src/schemas/apiSchema.ts
index dd8dc6cd455..03f25ad9c58 100644
--- a/src/schemas/apiSchema.ts
+++ b/src/schemas/apiSchema.ts
@@ -440,6 +440,7 @@ const zSettings = z.object({
'Comfy.TextareaWidget.FontSize': z.number(),
'Comfy.TextareaWidget.Spellcheck': z.boolean(),
'Comfy.UseNewMenu': z.enum(['Disabled', 'Top']),
+ 'Comfy.Menu.ShowClearPendingTasksButton': z.boolean(),
'Comfy.TreeExplorer.ItemPadding': z.number(),
'Comfy.Validation.Workflows': z.boolean(),
'Comfy.Workflow.SortNodeIdOnSave': z.boolean(),