mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-02 15:16:40 +00:00
chore: sync various (#9864)
* chore: sync various Signed-off-by: mertmit <mertmit99@gmail.com> * test: ws scope Signed-off-by: mertmit <mertmit99@gmail.com> * fix(nc-gui): ncSubmenu right icon visibility issue * fix(nc-gui): use viewTypeAlias in all the places --------- Signed-off-by: mertmit <mertmit99@gmail.com> Co-authored-by: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,7 @@ const props = defineProps<{ loadDatasourceInfo?: boolean; baseId?: string }>()
|
||||
|
||||
const { loadDatasourceInfo, baseId } = toRefs(props)
|
||||
|
||||
const { pageMode, IntegrationsPageMode, integrationType, activeIntegration } = useIntegrationStore()
|
||||
const { pageMode, IntegrationsPageMode, integrationType, activeIntegrationItem, activeIntegration } = useIntegrationStore()
|
||||
|
||||
const isEditOrAddIntegrationModalOpen = computed({
|
||||
get: () => {
|
||||
@@ -16,20 +16,22 @@ const isEditOrAddIntegrationModalOpen = computed({
|
||||
},
|
||||
})
|
||||
|
||||
const connectionType = computed(() => {
|
||||
switch (
|
||||
pageMode.value === IntegrationsPageMode.EDIT
|
||||
? activeIntegration.value?.sub_type || activeIntegration.value?.config?.client
|
||||
: activeIntegration.value?.type
|
||||
) {
|
||||
const activeIntegrationSubType = computed(() => {
|
||||
return pageMode.value === IntegrationsPageMode.EDIT
|
||||
? activeIntegration.value?.sub_type || activeIntegration.value?.config?.client
|
||||
: activeIntegration.value?.type
|
||||
})
|
||||
|
||||
const activeIntegrationType = computed(() => {
|
||||
switch (activeIntegrationSubType.value) {
|
||||
case integrationType.PostgreSQL:
|
||||
return ClientType.PG
|
||||
return IntegrationCategoryType.DATABASE
|
||||
case integrationType.MySQL:
|
||||
return ClientType.MYSQL
|
||||
return IntegrationCategoryType.DATABASE
|
||||
case integrationType.SQLITE:
|
||||
return ClientType.SQLITE
|
||||
return IntegrationCategoryType.DATABASE
|
||||
default: {
|
||||
return undefined
|
||||
return activeIntegrationItem.value?.type
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -42,10 +44,19 @@ const connectionType = computed(() => {
|
||||
wrap-class-name="nc-modal-edit-or-add-integration"
|
||||
@keydown.esc="isEditOrAddIntegrationModalOpen = false"
|
||||
>
|
||||
<div v-if="connectionType" class="h-full">
|
||||
<div v-if="activeIntegrationType === IntegrationCategoryType.DATABASE" class="h-full">
|
||||
<WorkspaceIntegrationsFormsEditOrAddDatabase
|
||||
v-model:open="isEditOrAddIntegrationModalOpen"
|
||||
:connection-type="connectionType"
|
||||
:connection-type="activeIntegrationSubType"
|
||||
:load-datasource-info="loadDatasourceInfo"
|
||||
:base-id="baseId"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="activeIntegrationType === IntegrationCategoryType.AI" class="h-full">
|
||||
<WorkspaceIntegrationsFormsEditOrAddCommon
|
||||
v-model:open="isEditOrAddIntegrationModalOpen"
|
||||
:integration-type="activeIntegrationItem?.type"
|
||||
:integration-sub-type="activeIntegrationItem?.subType"
|
||||
:load-datasource-info="loadDatasourceInfo"
|
||||
:base-id="baseId"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user