|
|
|
@ -1,5 +1,13 @@
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
|
import { ClientType, SSLUsage } from 'nocodb-sdk' |
|
|
|
|
import { Action } from '../../../composables/useAccountSetupStore' |
|
|
|
|
import type { |
|
|
|
|
CertTypes, |
|
|
|
|
DatabricksConnection, |
|
|
|
|
DefaultConnection, |
|
|
|
|
SQLiteConnection, |
|
|
|
|
SnowflakeConnection, |
|
|
|
|
} from '../../../utils/baseCreateUtils' |
|
|
|
|
|
|
|
|
|
const props = defineProps<{ |
|
|
|
|
id: string |
|
|
|
@ -29,7 +37,7 @@ const pluginTypeMap = {
|
|
|
|
|
Password: FormBuilderInputType.Password, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const { formState, validate } = useProvideFormBuilderHelper({ |
|
|
|
|
const { formState, validate, validateInfos } = useProvideFormBuilderHelper({ |
|
|
|
|
formSchema: [ |
|
|
|
|
...plugin.value.formDetails.items.map((item) => ({ |
|
|
|
|
type: pluginTypeMap[item.type] || FormBuilderInputType.Input, |
|
|
|
@ -64,10 +72,14 @@ const doAction = async (action: Action) => {
|
|
|
|
|
loadingAction.value = null |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const isValid = computed(() => { |
|
|
|
|
return Object.values(validateInfos || {}).every((info) => info.validateStatus !== 'error') |
|
|
|
|
}) |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<div class="flex flex-col" data-test-id="nc-setup"> |
|
|
|
|
<div class="flex flex-col h-full h-[calc(100vh_-_40px)]" data-test-id="nc-setup"> |
|
|
|
|
<NcPageHeader> |
|
|
|
|
<template #title> |
|
|
|
|
<span data-rec="true"> |
|
|
|
@ -75,10 +87,9 @@ const doAction = async (action: Action) => {
|
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</NcPageHeader> |
|
|
|
|
<div class="flex gap-30"> |
|
|
|
|
<div class="flex-grow" /> |
|
|
|
|
<div> |
|
|
|
|
<div class="mt-4 pb-4 w-150 mx-auto flex items-center gap-3 border-b-1 border-gray-200"> |
|
|
|
|
<div class="h-full flex h-[calc(100%_-_48px)]"> |
|
|
|
|
<div class="nc-config-left-panel nc-scrollbar-thin relative h-full flex flex-col"> |
|
|
|
|
<div class="w-full flex items-center gap-3 border-b-1 border-gray-200 h-12 py-2 px-3"> |
|
|
|
|
<div |
|
|
|
|
v-if="plugin.logo" |
|
|
|
|
class="mr-1 flex items-center justify-center" |
|
|
|
@ -98,14 +109,14 @@ const doAction = async (action: Action) => {
|
|
|
|
|
:loading="loadingAction === action.key" |
|
|
|
|
:type="action.key === Action.Save ? 'primary' : 'default'" |
|
|
|
|
size="small" |
|
|
|
|
:disabled="!!loadingAction" |
|
|
|
|
:disabled="!!loadingAction || !isValid" |
|
|
|
|
@click="doAction(action.key)" |
|
|
|
|
> |
|
|
|
|
{{ action.label === 'Save' ? 'Save configuration' : action.label }} |
|
|
|
|
</NcButton> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="h-[calc(100%_-_58px)] flex py-4 flex-col"> |
|
|
|
|
<div class="h-[calc(100%_-_48px)] flex py-4 flex-col p-6 overflow-auto"> |
|
|
|
|
<div v-if="isLoading || !plugin" class="flex flex-row w-full justify-center items-center h-52"> |
|
|
|
|
<a-spin size="large" /> |
|
|
|
|
</div> |
|
|
|
@ -115,18 +126,29 @@ const doAction = async (action: Action) => {
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex-grow mt-15 flex flex-col gap-3"> |
|
|
|
|
<div class="text-gray-500 text-capitalize">Documentation</div> |
|
|
|
|
<div class="nc-config-right-panel"> |
|
|
|
|
<div class="flex-grow flex flex-col gap-3"> |
|
|
|
|
<div class="text-gray-500 text-capitalize">Documentation</div> |
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
<GeneralIcon icon="bookOpen" class="text-gray-500" /> |
|
|
|
|
Workspace Setup |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<GeneralIcon icon="bookOpen" class="text-gray-500" /> |
|
|
|
|
Setting up SMTP as email service |
|
|
|
|
<div> |
|
|
|
|
<GeneralIcon icon="bookOpen" class="text-gray-500" /> |
|
|
|
|
Workspace Setup |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<GeneralIcon icon="bookOpen" class="text-gray-500" /> |
|
|
|
|
Setting up SMTP as email service |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.nc-config-left-panel { |
|
|
|
|
@apply w-full flex-1 flex justify-stretch; |
|
|
|
|
} |
|
|
|
|
.nc-config-right-panel { |
|
|
|
|
@apply p-5 w-[320px] border-l-1 border-gray-200 flex flex-col gap-4 bg-gray-50 rounded-br-2xl; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|