From ebc71b0e46137cab2c3944fb6b42c886ac536db8 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Fri, 4 Oct 2024 15:33:27 -0400 Subject: [PATCH] Add PromptDialog to replace window.prompt (#1104) * Save file prompt dialog * Don't download if dialog dismissed * refactor * style dialog * nit * Autofocus --- src/App.vue | 2 +- src/components/dialog/GlobalDialog.vue | 5 +- .../content/ExecutionErrorDialogContent.vue | 4 -- .../dialog/content/PromptDialogContent.vue | 43 ++++++++++++++++ .../templates/TemplateWorkflowsContent.vue | 2 +- src/scripts/app.ts | 6 +-- src/scripts/ui.ts | 51 ++----------------- src/scripts/ui/menu/index.ts | 23 ++++++--- src/services/dialogService.ts | 42 ++++++++++++++- src/stores/commandStore.ts | 8 +++ src/stores/dialogStore.ts | 28 +++++++--- tests-ui/globalSetup.ts | 10 +++- 12 files changed, 148 insertions(+), 76 deletions(-) create mode 100644 src/components/dialog/content/PromptDialogContent.vue diff --git a/src/App.vue b/src/App.vue index 344e8df70..675f4fc87 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,7 +10,7 @@ diff --git a/src/components/templates/TemplateWorkflowsContent.vue b/src/components/templates/TemplateWorkflowsContent.vue index bbaf67863..65adbb396 100644 --- a/src/components/templates/TemplateWorkflowsContent.vue +++ b/src/components/templates/TemplateWorkflowsContent.vue @@ -1,6 +1,6 @@