π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
fix: minor ux changes
DarkPhoenix27042c172423edb7
diff --git a/packages/nc-gui/components/account/Breadcrumb.vue b/packages/nc-gui/components/account/Breadcrumb.vueindex 55a83fb94d..08017b9ca0 100644--- a/packages/nc-gui/components/account/Breadcrumb.vue+++ b/packages/nc-gui/components/account/Breadcrumb.vue@@ -33,7 +33,7 @@ const breadcrumb = computed<BreadcrumbType[]>(() => {}case 'mcp': {payload.push({- title: t('title.oauthClients'),+ title: t('title.mcpServer'),active: true,})breakdiff --git a/packages/nc-gui/components/account/mcp/index.vue b/packages/nc-gui/components/account/mcp/index.vueindex 89b1f33023..7c3f5c658a 100644--- a/packages/nc-gui/components/account/mcp/index.vue+++ b/packages/nc-gui/components/account/mcp/index.vue@@ -1,11 +1,3 @@-<script setup lang="ts">--</script>-<template>-+ <NcSpanHidden /></template>--<style scoped lang="scss">--</style>\ No newline at end of filediff --git a/packages/nc-gui/components/dashboard/settings/base/MCP/index.vue b/packages/nc-gui/components/dashboard/settings/base/MCP/index.vueindex 13874881e8..7631ee2ca1 100644--- a/packages/nc-gui/components/dashboard/settings/base/MCP/index.vue+++ b/packages/nc-gui/components/dashboard/settings/base/MCP/index.vue@@ -3,6 +3,8 @@ import dayjs from 'dayjs'const { t } = useI18n()+const newTokenInputRef = ref()+const { sorts, sortDirection, loadSorts, handleGetSortedData, saveOrUpdate: saveOrUpdateSort } = useUserSorts('Webhook') // Using 'Webhook' as the sort type since 'MCPToken' isn't definedconst orderBy = computed<Record<string, SordDirectionType>>({@@ -33,12 +35,20 @@ const {listMcpTokens,cancelNewMcpToken,isUnsavedMCPTokenPending,- addNewMcpToken,+ addNewMcpToken: _addNewMcpToken,isCreatingMcpToken,newMcpTokenTitle,updateMcpToken,} = useMcpSettings()+const addNewMcpToken = () => {+ _addNewMcpToken()++ nextTick(() => {+ newTokenInputRef.value.focus()+ })+}+const sortedMcpTokens = computed(() => handleGetSortedData(mcpTokens.value, sorts.value))const columns = [@@ -148,7 +158,7 @@ const getFormattedDate = (date: string, format?: string) => dayjs(date).format(f<div class="flex flex-col w-full"><div class="text-nc-content-gray-emphasis font-semibold text-lg">- {{ $t('labels.modelContextProtocol') }}+ {{ $t('title.mcpServer') }}</div><div class="text-nc-content-gray-subtle2 mt-2 leading-5">@@ -197,7 +207,15 @@ const getFormattedDate = (date: string, format?: string) => dayjs(date).format(f</div></template></NcTooltip>- <a-input v-else v-model:value="newMcpTokenTitle" class="new-token-title" placeholder="Token name" />+ <a-input+ v-else+ ref="newTokenInputRef"+ v-model:value="newMcpTokenTitle"+ class="new-token-title"+ placeholder="Token name"+ @keydown.enter="createTokenWithExpiry(token)"+ @keydown.esc="cancelNewMcpToken"+ /></template><template v-if="column.key === 'created_at'">diff --git a/packages/nc-gui/components/dashboard/settings/base/index.vue b/packages/nc-gui/components/dashboard/settings/base/index.vueindex 666eb69731..a3a81c6a2e 100644--- a/packages/nc-gui/components/dashboard/settings/base/index.vue+++ b/packages/nc-gui/components/dashboard/settings/base/index.vue@@ -135,7 +135,7 @@ watch(><GeneralIcon icon="mcp" /><span>- {{ $t('labels.modelContextProtocol') }}+ {{ $t('title.mcpServer') }}</span></div>diff --git a/packages/nc-gui/composables/useMcpSettings.ts b/packages/nc-gui/composables/useMcpSettings.tsindex 0759eb3943..5592c53802 100644--- a/packages/nc-gui/composables/useMcpSettings.ts+++ b/packages/nc-gui/composables/useMcpSettings.ts@@ -17,9 +17,9 @@ export const useMcpSettings = createSharedComposable(() => {const basesStore = useBases()- const { activeWorkspaceId } = storeToRefs(useWorkspace())+ const { activeWorkspaceId, activeWorkspace } = storeToRefs(useWorkspace())- const { activeProjectId } = storeToRefs(basesStore)+ const { activeProjectId, openedProject } = storeToRefs(basesStore)const { basesUser } = storeToRefs(basesStore)@@ -170,9 +170,10 @@ export const useMcpSettings = createSharedComposable(() => {}const addNewMcpToken = () => {- newMcpTokenTitle.value = `MCP - ${user.value?.display_name ?? user.value?.email?.split('@')?.[0]} - ${dayjs().format(+ newMcpTokenTitle.value = `${openedProject.value?.title || 'Base'}(${activeWorkspace.value?.title}) : ${dayjs().format('D MMMM YYYY, h:mm A',)}`+mcpTokens.value = [{title: newMcpTokenTitle.value,diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.jsonindex e46531ab50..3c9ac8c7b4 100644--- a/packages/nc-gui/lang/en.json+++ b/packages/nc-gui/lang/en.json@@ -699,6 +699,7 @@"isNotNull": "is not null"},"title": {+ "mcpServer": "MCP Server","accessRestricted": "Access Restricted","editTablePermissions": "Edit table permissions","editFieldPermissions": "Edit field permissions",