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:
Chenlei Hu
2024-09-25 11:55:50 +09:00
parent 59976ea357
commit 5ee0fd3519
10 changed files with 188 additions and 200 deletions

View File

@@ -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
})