From aac40e3494ebaf911fe969a90df36f2daa65d7cf Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Wed, 17 Aug 2022 23:18:48 +0200 Subject: [PATCH] chore(gui-v2): cleanup imports --- .../components/dlg/AirtableImport.vue | 59 ++++++++++--------- .../nc-gui-v2/components/dlg/TableCreate.vue | 16 ++--- .../[projectType]/[projectId]/index/index.vue | 18 +++++- .../[projectId]/index/index/index.vue | 1 + 4 files changed, 56 insertions(+), 38 deletions(-) diff --git a/packages/nc-gui-v2/components/dlg/AirtableImport.vue b/packages/nc-gui-v2/components/dlg/AirtableImport.vue index ae70558e9e..0ec751c566 100644 --- a/packages/nc-gui-v2/components/dlg/AirtableImport.vue +++ b/packages/nc-gui-v2/components/dlg/AirtableImport.vue @@ -1,12 +1,20 @@ diff --git a/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index.vue b/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index.vue index 9c56c35bd5..6a87f73002 100644 --- a/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index.vue +++ b/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index.vue @@ -33,13 +33,17 @@ const icon = (tab: TabItem) => { function openQuickImportDialog(type: string) { $e(`a:actions:import-${type}`) + const isOpen = ref(true) + const { close } = useDialog(DlgQuickImport, { - 'modelValue': true, + 'modelValue': isOpen, 'importType': type, 'onUpdate:modelValue': closeDialog, }) function closeDialog() { + isOpen.value = false + close(1000) } } @@ -47,12 +51,16 @@ function openQuickImportDialog(type: string) { function openTableCreateDialog() { $e('a:actions:create-table') + const isOpen = ref(true) + const { close } = useDialog(DlgTableCreate, { - 'modelValue': true, + 'modelValue': isOpen, 'onUpdate:modelValue': closeDialog, }) function closeDialog() { + isOpen.value = false + close(1000) } } @@ -60,12 +68,16 @@ function openTableCreateDialog() { function openAirtableImportDialog() { $e('a:actions:import-airtable') + const isOpen = ref(true) + const { close } = useDialog(DlgAirtableImport, { - 'modelValue': true, + 'modelValue': isOpen, 'onUpdate:modelValue': closeDialog, }) function closeDialog() { + isOpen.value = false + close(1000) } } diff --git a/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index/index.vue b/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index/index.vue index e7a3d92c44..e26ac514c4 100644 --- a/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index/index.vue +++ b/packages/nc-gui-v2/pages/[projectType]/[projectId]/index/index/index.vue @@ -76,6 +76,7 @@ function openQuickImportDialog(type: QuickImportTypes, file: File) { function closeDialog() { isOpen.value = false + close(1000) } }