From 2129b1b6ce65cccaabc0b1db9952c48e5e5616c7 Mon Sep 17 00:00:00 2001
From: Hu Gang <18768366022@163.com>
Date: Mon, 26 May 2025 16:47:04 +0800
Subject: [PATCH] feat: mcp status, mcp internationalization
---
src/apis/paths/mcp.ts | 1 +
src/i18n/lang/en.ts | 25 +++
src/i18n/lang/zh-cn.ts | 25 +++
src/views/api/components/McpDrawer.vue | 62 ++++--
src/views/api/components/McpServiceDetail.vue | 30 ++-
src/views/api/index.vue | 177 +++++++++++++-----
src/views/createapp/components/McpDrawer.vue | 14 +-
7 files changed, 268 insertions(+), 66 deletions(-)
diff --git a/src/apis/paths/mcp.ts b/src/apis/paths/mcp.ts
index 8906fe9b..53d51537 100644
--- a/src/apis/paths/mcp.ts
+++ b/src/apis/paths/mcp.ts
@@ -22,6 +22,7 @@ const getMcpList = (params: {
icon: string;
author: string;
isActive: boolean;
+ status: 'installing' | 'ready' | 'failed';
},
];
totalModels: number;
diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts
index 5ad57468..55dff385 100644
--- a/src/i18n/lang/en.ts
+++ b/src/i18n/lang/en.ts
@@ -11,6 +11,7 @@ export default {
createTime: 'Create Time',
operate: 'Operate',
copy: 'Copy',
+ icon: 'Icon',
},
settings: {
model: 'Model',
@@ -71,6 +72,30 @@ export default {
edit: 'Edit',
analyze: 'Analyze',
},
+ plugin_center: {
+ plugin_name: 'Plugin Name',
+ author: 'Author',
+ mcp: {
+ installing: 'Installing',
+ install_failed: 'Install Failed',
+ create_mcp: 'Create MCP',
+ edit_mcp: 'Edit MCP',
+ mcp_name: 'MCP Name',
+ mcp_description: 'MCP Description',
+ mcp_type: 'MCP Type',
+ activate: 'Activate',
+ deactivate: 'Deactivate',
+ },
+ upload_icon: 'Upload Icon',
+ please_upload_icon: 'Please upload icon',
+ please_input_mcp_name: 'Please input MCP name',
+ please_select_mcp_description: 'Please select MCP description',
+ server_detail: 'Server Details',
+ server_tool: 'Server Tools',
+ server_description: 'Server Description',
+ tool_input_schema: 'Tool Input Schema',
+ tool_output_schema: 'Tool Output Schema',
+ },
app: {
app_center: 'App Center',
all_select: 'All',
diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts
index 7222b873..c2429683 100644
--- a/src/i18n/lang/zh-cn.ts
+++ b/src/i18n/lang/zh-cn.ts
@@ -11,6 +11,7 @@ export default {
createTime: '创建时间',
operate: '操作',
copy: '复制',
+ icon: '图标',
},
settings: {
model: '模型',
@@ -76,6 +77,30 @@ export default {
edit: '编辑',
analyze: '解析',
},
+ plugin_center: {
+ plugin_name: '插件名称',
+ author: '创建人',
+ mcp: {
+ installing: '安装中',
+ installFailed: '安装失败',
+ create_mcp: '创建MCP服务',
+ edit_mcp: '编辑MCP服务',
+ mcp_name: 'MCP名称',
+ mcp_description: 'MCP描述',
+ mcp_type: 'MCP类型',
+ activate: '激活',
+ deactivate: '取消激活',
+ },
+ upload_icon: '上传图标',
+ please_upload_icon: '请上传图标',
+ please_input_mcp_name: '请输入MCP名称',
+ please_select_mcp_description: '请选择MCP描述',
+ server_detail: '服务详情',
+ server_tool: '工具',
+ server_description: '描述',
+ tool_input_schema: '工具入参',
+ tool_output_schema: '工具出参',
+ },
app: {
app_center: '应用中心',
all_select: '全部',
diff --git a/src/views/api/components/McpDrawer.vue b/src/views/api/components/McpDrawer.vue
index 6009ad28..9e51747b 100644
--- a/src/views/api/components/McpDrawer.vue
+++ b/src/views/api/components/McpDrawer.vue
@@ -1,9 +1,10 @@