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:
Mert E.
2024-11-20 19:18:09 +03:00
committed by GitHub
parent 50600bfbda
commit 6724fd2f9d
183 changed files with 15394 additions and 3590 deletions

View File

@@ -1,4 +1,5 @@
<script lang="ts" setup>
import { integrationCategoryNeedDefault } from 'nocodb-sdk'
import type { IntegrationType, UserType, WorkspaceUserType } from 'nocodb-sdk'
import dayjs from 'dayjs'
@@ -16,8 +17,11 @@ const {
editIntegration,
duplicateIntegration,
getIntegration,
setDefaultIntegration,
} = useIntegrationStore()
const { loadAiIntegrations } = useNocoAi()
const { $api, $e } = useNuxtApp()
const { allCollaborators } = storeToRefs(useWorkspace())
@@ -160,6 +164,10 @@ const onDeleteConfirm = async () => {
sources: [...base.sources.filter((s) => s.id !== source.id)],
})
}
if (toBeDeletedIntegration.value?.type && toBeDeletedIntegration.value.type === IntegrationCategoryType.AI) {
loadAiIntegrations()
}
}
}
@@ -518,6 +526,13 @@ onKeyStroke('ArrowDown', onDown)
</NcButton>
<template #overlay>
<NcMenu>
<NcMenuItem
v-if="integration.type && integrationCategoryNeedDefault(integration.type) && !integration.is_default"
@click="setDefaultIntegration(integration)"
>
<GeneralIcon class="text-gray-800" icon="star" />
<span>Set as default</span>
</NcMenuItem>
<NcMenuItem @click="editIntegration(integration)">
<GeneralIcon class="text-gray-800" icon="edit" />
<span>{{ $t('general.edit') }}</span>