Skip to content

Commit 9050680

Browse files
feat: update mcp form label (#8327)
1 parent 0022a9b commit 9050680

6 files changed

Lines changed: 26 additions & 25 deletions

File tree

frontend/src/lang/modules/en.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2605,8 +2605,8 @@ const message = {
26052605
},
26062606
mcp: {
26072607
server: 'MCP Server',
2608-
create: 'Add Server',
2609-
edit: 'Edit Server',
2608+
create: 'Add MCP Server',
2609+
edit: 'Edit MCP Server',
26102610
commandHelper: 'For example: npx -y {0}',
26112611
baseUrl: 'External Access Path',
26122612
baseUrlHelper: 'For example: https://127.0.0.1:8080',

frontend/src/lang/modules/tw.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2439,14 +2439,14 @@ const message = {
24392439
whiteListHelper: '限制僅白名單中的 IP 可瀏覽',
24402440
},
24412441
mcp: {
2442-
server: 'MCP 伺服器',
2443-
create: '添加伺服器',
2444-
edit: '編輯伺服器',
2442+
server: 'MCP Server',
2443+
create: '创建 MCP Server',
2444+
edit: '編輯 MCP Server',
24452445
commandHelper: '例如:npx -y {0}',
24462446
baseUrl: '外部訪問路徑',
24472447
baseUrlHelper: '例如:https://127.0.0.1:8080',
24482448
ssePath: 'SSE 路徑',
2449-
ssePathHelper: '例如:/sse,注意不要與其他伺服器重複',
2449+
ssePathHelper: '例如:/sse,注意不要與其他 Server 重複',
24502450
environment: '環境變數',
24512451
envKey: '變數名',
24522452
envValue: '變數值',
@@ -2456,7 +2456,7 @@ const message = {
24562456
domainHelper: '例如:192.168.1.1 或者 example.com',
24572457
bindDomain: '綁定網站',
24582458
commandPlaceHolder: '當前僅支持 npx 和二進制啟動的命令',
2459-
importMcpJson: '導入 MCP 伺服器配置',
2459+
importMcpJson: '導入 MCP Server配置',
24602460
importMcpJsonError: 'mcpServers 結構不正確',
24612461
},
24622462
};

frontend/src/lang/modules/zh.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2441,14 +2441,14 @@ const message = {
24412441
whiteListHelper: '限制仅白名单中的 IP 可访问',
24422442
},
24432443
mcp: {
2444-
server: 'MCP 服务器',
2445-
create: '添加服务器',
2446-
edit: '编辑服务器',
2444+
server: 'MCP Server',
2445+
create: '创建 MCP Server',
2446+
edit: '编辑 MCP Server',
24472447
commandHelper: '例如:npx -y {0}',
24482448
baseUrl: '外部访问路径',
24492449
baseUrlHelper: '例如:https://127.0.0.1:8080',
24502450
ssePath: 'SSE 路径',
2451-
ssePathHelper: '例如:/sse,注意不要与其他服务器重复',
2451+
ssePathHelper: '例如:/sse,注意不要与其他 Server 重复',
24522452
environment: '环境变量',
24532453
envKey: '变量名',
24542454
envValue: '变量值',
@@ -2458,7 +2458,7 @@ const message = {
24582458
domainHelper: '例如:192.168.1.1 或者 example.com',
24592459
bindDomain: '绑定网站',
24602460
commandPlaceHolder: '当前仅支持 npx 和二进制启动的命令',
2461-
importMcpJson: '导入 MCP 服务器配置',
2461+
importMcpJson: '导入 MCP Server 配置',
24622462
importMcpJsonError: 'mcpServers 结构不正确',
24632463
},
24642464
};

frontend/src/routers/modules/ai.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ const databaseRouter = {
2020
},
2121
},
2222
{
23-
path: '/ai/gpu',
24-
name: 'GPU',
25-
component: () => import('@/views/ai/gpu/index.vue'),
23+
path: '/ai/mcp',
24+
name: 'MCPServer',
25+
component: () => import('@/views/ai/mcp/server/index.vue'),
2626
meta: {
27-
title: 'ai_tools.gpu.gpu',
27+
title: 'MCP',
2828
requiresAuth: true,
2929
},
3030
},
3131
{
32-
path: '/ai/mcp',
33-
name: 'MCPServer',
34-
component: () => import('@/views/ai/mcp/server/index.vue'),
32+
path: '/ai/gpu',
33+
name: 'GPU',
34+
component: () => import('@/views/ai/gpu/index.vue'),
3535
meta: {
36-
title: 'MCP',
36+
title: 'ai_tools.gpu.gpu',
3737
requiresAuth: true,
3838
},
3939
},

frontend/src/views/ai/mcp/index.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
</template>
99

1010
<script lang="ts" setup>
11-
import i18n from '@/lang';
12-
1311
const buttons = [
1412
{
15-
label: i18n.global.t('container.server'),
13+
label: 'Servers',
1614
path: '/ai/mcp/servers',
1715
},
1816
];

frontend/src/views/ai/mcp/server/index.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div>
33
<RouterMenu />
4-
<LayoutContent :title="$t('container.server')" v-loading="loading">
4+
<LayoutContent :title="'Servers'" v-loading="loading">
55
<template #toolbar>
66
<div class="flex flex-wrap gap-3">
77
<el-button type="primary" @click="openCreate">
@@ -189,7 +189,10 @@ const openDetail = (row: AI.McpServer) => {
189189
};
190190
191191
const openCreate = () => {
192-
const maxPort = Math.max(...items.value.map((item) => item.port));
192+
let maxPort = 8000;
193+
if (items.value && items.value.length > 0) {
194+
maxPort = Math.max(...items.value.map((item) => item.port));
195+
}
193196
createRef.value.acceptParams({ port: maxPort + 1 });
194197
};
195198

0 commit comments

Comments
 (0)