Browse Source

feat: moved everything to generic button

pull/6336/head
sreehari jayaraj 1 year ago
parent
commit
cb88fe11dc
  1. 40
      packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
  2. 16
      packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue

40
packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue

@ -507,9 +507,9 @@ watch(
</a-form-item> </a-form-item>
<div class="flex items-right justify-end gap-2"> <div class="flex items-right justify-end gap-2">
<!-- Use Connection URL --> <!-- Use Connection URL -->
<a-button class="nc-extdb-btn-import-url !rounded-md" @click.stop="importURLDlg = true"> <NcButton size="small" class="nc-extdb-btn-import-url !rounded-md" @click.stop="importURLDlg = true">
{{ $t('activity.useConnectionUrl') }} {{ $t('activity.useConnectionUrl') }}
</a-button> </NcButton>
</div> </div>
<a-collapse ghost expand-icon-position="right" class="!mt-6"> <a-collapse ghost expand-icon-position="right" class="!mt-6">
@ -531,9 +531,9 @@ watch(
<span>{{ $t('tooltip.clientCert') }}</span> <span>{{ $t('tooltip.clientCert') }}</span>
</template> </template>
<a-button :disabled="!sslFilesRequired" class="shadow" @click="certFileInput?.click()"> <NcButton size="small" :disabled="!sslFilesRequired" class="shadow" @click="certFileInput?.click()">
{{ $t('labels.clientCert') }} {{ $t('labels.clientCert') }}
</a-button> </NcButton>
</a-tooltip> </a-tooltip>
<a-tooltip placement="top"> <a-tooltip placement="top">
@ -541,9 +541,9 @@ watch(
<template #title> <template #title>
<span>{{ $t('tooltip.clientKey') }}</span> <span>{{ $t('tooltip.clientKey') }}</span>
</template> </template>
<a-button :disabled="!sslFilesRequired" class="shadow" @click="keyFileInput?.click()"> <NcButton size="small" :disabled="!sslFilesRequired" class="shadow" @click="keyFileInput?.click()">
{{ $t('labels.clientKey') }} {{ $t('labels.clientKey') }}
</a-button> </NcButton>
</a-tooltip> </a-tooltip>
<a-tooltip placement="top"> <a-tooltip placement="top">
@ -552,9 +552,9 @@ watch(
<span>{{ $t('tooltip.clientCA') }}</span> <span>{{ $t('tooltip.clientCA') }}</span>
</template> </template>
<a-button :disabled="!sslFilesRequired" class="shadow" @click="caFileInput?.click()"> <NcButton size="small" :disabled="!sslFilesRequired" class="shadow" @click="caFileInput?.click()">
{{ $t('labels.serverCA') }} {{ $t('labels.serverCA') }}
</a-button> </NcButton>
</a-tooltip> </a-tooltip>
</div> </div>
</a-form-item> </a-form-item>
@ -585,11 +585,11 @@ watch(
/> />
</div> </div>
</div> </div>
<a-button type="dashed" class="w-full caption mt-2" @click="addNewParam"> <NcButton size="small" type="dashed" class="w-full caption mt-2" @click="addNewParam">
<div class="flex items-center justify-center"> <div class="flex items-center justify-center">
<component :is="iconMap.plus" /> <component :is="iconMap.plus" />
</div> </div>
</a-button> </NcButton>
</a-card> </a-card>
</a-form-item> </a-form-item>
@ -614,10 +614,10 @@ watch(
</a-form-item> </a-form-item>
<div class="flex justify-end"> <div class="flex justify-end">
<a-button type="primary" class="!rounded-md" @click="handleEditJSON()"> <NcButton type="primary" size="small" class="!rounded-md" @click="handleEditJSON()">
<!-- Edit connection JSON --> <!-- Edit connection JSON -->
{{ $t('activity.editConnJson') }} {{ $t('activity.editConnJson') }}
</a-button> </NcButton>
</div> </div>
</a-collapse-panel> </a-collapse-panel>
</a-collapse> </a-collapse>
@ -626,13 +626,19 @@ watch(
<a-form-item class="flex justify-end !mt-5"> <a-form-item class="flex justify-end !mt-5">
<div class="flex justify-end gap-2"> <div class="flex justify-end gap-2">
<a-button type="primary" class="nc-extdb-btn-test-connection !rounded-md" @click="testConnection"> <NcButton type="primary" size="small" class="nc-extdb-btn-test-connection !rounded-md" @click="testConnection">
{{ $t('activity.testDbConn') }} {{ $t('activity.testDbConn') }}
</a-button> </NcButton>
<a-button type="primary" :disabled="!testSuccess" class="nc-extdb-btn-submit !rounded-md" @click="createBase"> <NcButton
size="small"
type="primary"
:disabled="!testSuccess"
class="nc-extdb-btn-submit !rounded-md"
@click="createBase"
>
{{ $t('general.submit') }} {{ $t('general.submit') }}
</a-button> </NcButton>
</div> </div>
</a-form-item> </a-form-item>
</a-form> </a-form>

16
packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue

@ -489,9 +489,9 @@ onMounted(async () => {
<span>{{ $t('tooltip.clientCert') }}</span> <span>{{ $t('tooltip.clientCert') }}</span>
</template> </template>
<a-button :disabled="!sslFilesRequired" class="shadow" @click="certFileInput?.click()"> <NcButton size="small" :disabled="!sslFilesRequired" class="shadow" @click="certFileInput?.click()">
{{ $t('labels.clientCert') }} {{ $t('labels.clientCert') }}
</a-button> </NcButton>
</a-tooltip> </a-tooltip>
<a-tooltip placement="top"> <a-tooltip placement="top">
@ -499,9 +499,9 @@ onMounted(async () => {
<template #title> <template #title>
<span>{{ $t('tooltip.clientKey') }}</span> <span>{{ $t('tooltip.clientKey') }}</span>
</template> </template>
<a-button :disabled="!sslFilesRequired" class="shadow" @click="keyFileInput?.click()"> <NcButton size="small" :disabled="!sslFilesRequired" class="shadow" @click="keyFileInput?.click()">
{{ $t('labels.clientKey') }} {{ $t('labels.clientKey') }}
</a-button> </NcButton>
</a-tooltip> </a-tooltip>
<a-tooltip placement="top"> <a-tooltip placement="top">
@ -510,9 +510,9 @@ onMounted(async () => {
<span>{{ $t('tooltip.clientCA') }}</span> <span>{{ $t('tooltip.clientCA') }}</span>
</template> </template>
<a-button :disabled="!sslFilesRequired" class="shadow" @click="caFileInput?.click()"> <NcButton size="small" :disabled="!sslFilesRequired" class="shadow" @click="caFileInput?.click()">
{{ $t('labels.serverCA') }} {{ $t('labels.serverCA') }}
</a-button> </NcButton>
</a-tooltip> </a-tooltip>
</div> </div>
</a-form-item> </a-form-item>
@ -543,9 +543,9 @@ onMounted(async () => {
/> />
</div> </div>
</div> </div>
<a-button type="dashed" class="w-full caption mt-2" @click="addNewParam"> <NcButton size="small" type="dashed" class="w-full caption mt-2" @click="addNewParam">
<div class="flex items-center justify-center"><component :is="iconMap.plus" /></div> <div class="flex items-center justify-center"><component :is="iconMap.plus" /></div>
</a-button> </NcButton>
</a-card> </a-card>
</a-form-item> </a-form-item>

Loading…
Cancel
Save