mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 12:07:08 +00:00
fix: gate AI chat with isEEFeatureBlocked instead of blockAiChat
This commit is contained in:
@@ -45,7 +45,7 @@ const {
|
||||
toggleChatPanel,
|
||||
} = useChatPanel()
|
||||
|
||||
const { blockAiChat, showEEFeatures } = useEeConfig()
|
||||
const { blockAiChat, isEEFeatureBlocked, showEEFeatures } = useEeConfig()
|
||||
|
||||
const handleChatToggle = () => {
|
||||
toggleChatPanel()
|
||||
@@ -254,7 +254,7 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
|
||||
|
||||
// Cmd/Ctrl + Shift + A — toggle AI chat
|
||||
useEventListener(document, 'keydown', (e: KeyboardEvent) => {
|
||||
if (!isEeUI || blockAiChat.value || !hasChatBaseContext.value) return
|
||||
if (!isEeUI || isEEFeatureBlocked.value || !hasChatBaseContext.value) return
|
||||
const cmdOrCtrl = isMac() ? e.metaKey : e.ctrlKey
|
||||
if (
|
||||
cmdOrCtrl &&
|
||||
@@ -313,7 +313,7 @@ useEventListener(document, 'keydown', (e: KeyboardEvent) => {
|
||||
|
||||
<!-- AI Chat -->
|
||||
<DashboardMiniSidebarV2DockItem
|
||||
v-if="isEeUI && !blockAiChat && hasChatWorkspaceContext && hasChatBaseContext && !isMobileMode"
|
||||
v-if="isEeUI && !isEEFeatureBlocked && hasChatWorkspaceContext && hasChatBaseContext && !isMobileMode"
|
||||
:ref="(el: any) => setItemRef('chat', el)"
|
||||
v-e="['c:chat:toggle']"
|
||||
label="Chat"
|
||||
|
||||
@@ -45,7 +45,7 @@ const {
|
||||
toggleChatPanel,
|
||||
} = useChatPanel()
|
||||
|
||||
const { blockAiChat, showEEFeatures } = useEeConfig()
|
||||
const { blockAiChat, isEEFeatureBlocked, showEEFeatures } = useEeConfig()
|
||||
|
||||
const handleChatToggle = () => {
|
||||
toggleChatPanel()
|
||||
@@ -140,7 +140,7 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
|
||||
|
||||
// Cmd/Ctrl + Shift + A — toggle AI chat
|
||||
useEventListener(document, 'keydown', (e: KeyboardEvent) => {
|
||||
if (!isEeUI || blockAiChat.value) return
|
||||
if (!isEeUI || isEEFeatureBlocked.value) return
|
||||
const cmdOrCtrl = isMac() ? e.metaKey : e.ctrlKey
|
||||
if (
|
||||
cmdOrCtrl &&
|
||||
@@ -236,7 +236,7 @@ const mainItems = computed<NavItem[]>(() => [
|
||||
|
||||
<!-- AI Chat -->
|
||||
<DashboardMiniSidebarV2RailItem
|
||||
v-if="isEeUI && !blockAiChat && hasChatWorkspaceContext && hasChatBaseContext && !isMobileMode"
|
||||
v-if="isEeUI && !isEEFeatureBlocked && hasChatWorkspaceContext && hasChatBaseContext && !isMobileMode"
|
||||
v-e="['c:chat:toggle']"
|
||||
label="Chat"
|
||||
panel-key="chat"
|
||||
|
||||
Reference in New Issue
Block a user