mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-09 07:00:06 +00:00
Rework queue button (#968)
* Move queue button to right side * Rework split button * Group * Remove unused code * x2 buttons * Use primevue divider * adjust style * Add tooltip * Update test * Add clearing pending tasks button to queue bar * Fix state * Dropdown list fix
This commit is contained in:
@@ -6,6 +6,7 @@ import { globalTracker } from '@/scripts/changeTracker'
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
import { useToastStore } from '@/stores/toastStore'
|
||||
import { showTemplateWorkflowsDialog } from '@/services/dialogService'
|
||||
import { useQueueStore } from './queueStore'
|
||||
|
||||
type Command = () => void | Promise<void>
|
||||
|
||||
@@ -73,6 +74,15 @@ export const useCommandStore = defineStore('command', () => {
|
||||
life: 1000
|
||||
})
|
||||
},
|
||||
'Comfy.ClearPendingTasks': async () => {
|
||||
await useQueueStore().clear(['queue'])
|
||||
useToastStore().add({
|
||||
severity: 'info',
|
||||
summary: 'Confirmed',
|
||||
detail: 'Pending tasks deleted',
|
||||
life: 3000
|
||||
})
|
||||
},
|
||||
'Comfy.BrowseTemplates': showTemplateWorkflowsDialog
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user