mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 10:42:44 +00:00
Replace window.dialog with prompt dialog in workflows.ts (#1138)
This commit is contained in:
@@ -13,6 +13,7 @@ import { useExecutionStore } from '@/stores/executionStore'
|
|||||||
import { markRaw, toRaw } from 'vue'
|
import { markRaw, toRaw } from 'vue'
|
||||||
import { UserDataFullInfo } from '@/types/apiTypes'
|
import { UserDataFullInfo } from '@/types/apiTypes'
|
||||||
import { useToastStore } from '@/stores/toastStore'
|
import { useToastStore } from '@/stores/toastStore'
|
||||||
|
import { showPromptDialog } from '@/services/dialogService'
|
||||||
|
|
||||||
export class ComfyWorkflowManager extends EventTarget {
|
export class ComfyWorkflowManager extends EventTarget {
|
||||||
executionStore: ReturnType<typeof useExecutionStore> | null
|
executionStore: ReturnType<typeof useExecutionStore> | null
|
||||||
@@ -369,10 +370,11 @@ export class ComfyWorkflow {
|
|||||||
|
|
||||||
private async _save(path: string | null, overwrite: boolean) {
|
private async _save(path: string | null, overwrite: boolean) {
|
||||||
if (!path) {
|
if (!path) {
|
||||||
path = prompt(
|
path = await showPromptDialog({
|
||||||
'Save workflow as:',
|
title: 'Save workflow',
|
||||||
trimJsonExt(this.path) ?? this.name ?? 'workflow'
|
message: 'Enter the filename:',
|
||||||
)
|
defaultValue: trimJsonExt(this.path) ?? this.name ?? 'workflow'
|
||||||
|
})
|
||||||
if (!path) return
|
if (!path) return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user