mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
[Refactor] Convert workflowService to composable (#2057)
This commit is contained in:
@@ -33,7 +33,7 @@ import { ComfyWorkflow } from '@/stores/workflowStore'
|
||||
import { useWorkflowStore } from '@/stores/workflowStore'
|
||||
import Button from 'primevue/button'
|
||||
import { ref } from 'vue'
|
||||
import { workflowService } from '@/services/workflowService'
|
||||
import { useWorkflowService } from '@/services/workflowService'
|
||||
import { useWorkspaceStore } from '@/stores/workspaceStore'
|
||||
import { usePragmaticDraggable, usePragmaticDroppable } from '@/hooks/dndHooks'
|
||||
|
||||
@@ -54,7 +54,7 @@ const workflowTabRef = ref<HTMLElement | null>(null)
|
||||
const closeWorkflows = async (options: WorkflowOption[]) => {
|
||||
for (const opt of options) {
|
||||
if (
|
||||
!(await workflowService.closeWorkflow(opt.workflow, {
|
||||
!(await useWorkflowService().closeWorkflow(opt.workflow, {
|
||||
warnIfUnsaved: !workspaceStore.shiftDown
|
||||
}))
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user