From 53ec221c5a152806cc83415b42bd73481a629e34 Mon Sep 17 00:00:00 2001 From: sreehari jayaraj Date: Fri, 8 Sep 2023 20:06:26 +0530 Subject: [PATCH] feat: generic button --- .../settings/data-sources/EditBase.vue | 56 +++++++++---------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue b/packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue index 60b94b68aa..941518dffc 100644 --- a/packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue +++ b/packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue @@ -234,6 +234,8 @@ const editBase = async () => { } } +const isConnSuccess = ref(false) + const testConnection = async () => { try { await validate() @@ -261,17 +263,7 @@ const testConnection = async () => { if (result.code === 0) { testSuccess.value = true - - Modal.confirm({ - title: t('msg.info.dbConnected'), - icon: null, - type: 'success', - okText: 'Ok & Edit Base', - okType: 'primary', - cancelText: t('general.cancel'), - onOk: editBase, - style: 'top: 30%!important', - }) + isConnSuccess.value = true } else { testSuccess.value = false @@ -472,9 +464,9 @@ onMounted(async () => {
- + {{ $t('activity.useConnectionUrl') }} - +
@@ -578,10 +570,10 @@ onMounted(async () => {
- + {{ $t('activity.editConnJson') }} - +
@@ -590,13 +582,19 @@ onMounted(async () => {
- + {{ $t('activity.testDbConn') }} - - - + + + {{ $t('general.submit') }} - +
@@ -628,17 +626,17 @@ onMounted(async () => {
- - + + -
-
{{ t('msg.info.dbConnected') }}
-
- {{ $t('general.cancel') }} - Ok & Add Base -
+
+
{{ t('msg.info.dbConnected') }}
+
+ {{ $t('general.cancel') }} + Ok & Edit Base
- +
+