mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 16:06:56 +00:00
fix: various gating
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import type { VNodeRef } from '@vue/runtime-core'
|
||||
import { IntegrationCategoryType } from 'nocodb-sdk'
|
||||
import { IntegrationCategoryType, PlanFeatureTypes } from 'nocodb-sdk'
|
||||
import NcModal from '~/components/nc/Modal.vue'
|
||||
|
||||
import { type IntegrationItemType, SyncDataType } from '#imports'
|
||||
@@ -42,7 +42,7 @@ const { activeWorkspace } = storeToRefs(useWorkspace())
|
||||
|
||||
const { isSyncFeatureEnabled } = storeToRefs(useSyncStore())
|
||||
|
||||
const { isEEFeatureBlocked } = useEeConfig()
|
||||
const { isEEFeatureBlocked, blockAiIntegrations, showUpgradeToUseAiIntegrations } = useEeConfig()
|
||||
|
||||
const easterEggToggle = computed(() => isFeatureEnabled(FEATURE_FLAG.INTEGRATIONS))
|
||||
|
||||
@@ -238,6 +238,11 @@ const handleAddIntegration = async (category: IntegrationCategoryType, integrati
|
||||
return
|
||||
}
|
||||
|
||||
if (category === IntegrationCategoryType.AI && blockAiIntegrations.value) {
|
||||
showUpgradeToUseAiIntegrations({})
|
||||
return
|
||||
}
|
||||
|
||||
await addIntegration(integration)
|
||||
}
|
||||
|
||||
@@ -464,8 +469,14 @@ watch(activeViewTab, (value) => {
|
||||
>
|
||||
<div class="category-type-title flex gap-2">
|
||||
{{ $t(category.title) }}
|
||||
<LazyPaymentUpgradeBadge
|
||||
v-if="category.value === IntegrationCategoryType.AI && blockAiIntegrations"
|
||||
:feature="PlanFeatureTypes.FEATURE_AI_INTEGRATIONS"
|
||||
:feature-enabled-callback="() => !blockAiIntegrations"
|
||||
remove-click
|
||||
/>
|
||||
<NcBadge
|
||||
v-if="!category.isAvailable"
|
||||
v-else-if="!category.isAvailable"
|
||||
:border="false"
|
||||
class="text-nc-content-brand !h-5 bg-nc-bg-brand text-xs font-normal px-2"
|
||||
>{{ $t('msg.toast.futureRelease') }}</NcBadge
|
||||
|
||||
Reference in New Issue
Block a user