mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-25 09:14:25 +00:00
[Refactor] Convert dialogService to composable (#2058)
This commit is contained in:
@@ -6,7 +6,7 @@ import { GroupNodeConfig, GroupNodeHandler } from './groupNode'
|
||||
import { LGraphCanvas } from '@comfyorg/litegraph'
|
||||
import { useToastStore } from '@/stores/toastStore'
|
||||
import { deserialiseAndCreate } from '@/extensions/core/vintageClipboard'
|
||||
import { showPromptDialog } from '@/services/dialogService'
|
||||
import { useDialogService } from '@/services/dialogService'
|
||||
import { t } from '@/i18n'
|
||||
|
||||
// Adds the ability to save and add multiple nodes as a template
|
||||
@@ -351,7 +351,7 @@ app.registerExtension({
|
||||
content: `Save Selected as Template`,
|
||||
disabled: !Object.keys(app.canvas.selected_nodes || {}).length,
|
||||
callback: async () => {
|
||||
const name = await showPromptDialog({
|
||||
const name = await useDialogService().showPromptDialog({
|
||||
title: t('nodeTemplates.saveAsTemplate'),
|
||||
message: t('nodeTemplates.enterName'),
|
||||
defaultValue: ''
|
||||
|
||||
Reference in New Issue
Block a user