diff --git a/packages/nc-gui/components/dashboard/settings/DataSources.vue b/packages/nc-gui/components/dashboard/settings/DataSources.vue index 083e47b273..d646149590 100644 --- a/packages/nc-gui/components/dashboard/settings/DataSources.vue +++ b/packages/nc-gui/components/dashboard/settings/DataSources.vue @@ -547,15 +547,11 @@ const isEditBaseModalOpen = computed({ - -
- -
-
+
diff --git a/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue b/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue index 32be622a7d..3b73ef38a1 100644 --- a/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue +++ b/packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue @@ -27,9 +27,11 @@ import { watch, } from '#imports' -const props = defineProps<{ connectionType?: ClientType }>() +const props = defineProps<{ open: boolean; connectionType?: ClientType }>() -const emit = defineEmits(['sourceCreated', 'close']) +const emit = defineEmits(['update:open', 'sourceCreated']) + +const vOpen = useVModel(props, 'open', emit) const connectionType = computed(() => props.connectionType ?? ClientType.MYSQL) @@ -284,7 +286,7 @@ const createSource = async () => { } emit('sourceCreated') - emit('close') + vOpen.value = false creatingSource.value = false } else if (status === JobStatus.FAILED) { message.error('Failed to create base') @@ -405,263 +407,295 @@ watch( }, { immediate: true }, ) +const toggleModal = (val: boolean) => { + vOpen.value = val +}