diff --git a/src/components/top-navigation/index.tsx b/src/components/top-navigation/index.tsx index 0259e57..2818925 100644 --- a/src/components/top-navigation/index.tsx +++ b/src/components/top-navigation/index.tsx @@ -8,6 +8,7 @@ import { MenuOutlined, SettingOutlined, TeamOutlined, + ThunderboltOutlined, UserOutlined, } from '@ant-design/icons'; import { Badge, Drawer, Menu, Tag } from 'antd'; @@ -110,20 +111,29 @@ export default function TopNavigation({ ), }, { - key: 'api-tokens', - icon: , - label: ( - {t('nav.api_tokens')} - ), - }, - { - key: 'mcp-connections', - icon: , - label: ( - - {t('nav.mcp_connections')} - - ), + key: 'automation', + icon: , + label: t('nav.automation'), + children: [ + { + key: 'api-tokens', + icon: , + label: ( + + {t('nav.api_tokens')} + + ), + }, + { + key: 'mcp-connections', + icon: , + label: ( + + {t('nav.mcp_connections')} + + ), + }, + ], }, { key: 'members', diff --git a/src/components/top-navigation/nav-items.tsx b/src/components/top-navigation/nav-items.tsx index d1d0fe8..d414074 100644 --- a/src/components/top-navigation/nav-items.tsx +++ b/src/components/top-navigation/nav-items.tsx @@ -210,6 +210,9 @@ export function getSelectedKeys(pathname: string) { if (pathname === rootRouterPath.apiTokens) { return ['api-tokens']; } + if (pathname === rootRouterPath.mcpConnections) { + return ['mcp-connections']; + } if (pathname === rootRouterPath.members) { return ['members']; } diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 821ee6f..f30c08a 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -220,13 +220,13 @@ "key_pending": "App Key pending" }, "api_tokens": { - "create_success": "API Token created successfully", + "create_success": "API Key created successfully", "create_failed": "Failed to create", - "revoke_success": "Token revoked", + "revoke_success": "API Key revoked", "revoke_failed": "Failed to revoke", "col_id": "ID", "col_name": "Name", - "col_token": "Token", + "col_token": "API Key", "col_permissions": "Permissions", "col_expires": "Expires", "col_last_used": "Last Used", @@ -239,19 +239,19 @@ "perm_delete": "Delete", "never": "Never", "never_used": "Never", - "revoke_title": "Revoke this token?", - "revoke_desc": "This token will no longer be usable. Are you sure?", + "revoke_title": "Revoke this API key?", + "revoke_desc": "This API key will no longer be usable. Are you sure?", "yes": "Yes", "no": "Cancel", "revoke_button": "Revoke", - "title": "API Tokens", - "description_prefix": "API Tokens can be used for CI/CD or automation scripts to call the ", + "title": "API Keys", + "description_prefix": "API Keys can be used for CI/CD or automation scripts to call the ", "pushy_api": "Pushy API", - "description_suffix": ". Each user can have up to 10 active tokens.", - "create_token": "Create Token", - "create_modal_title": "Create API Token", - "token_name": "Token Name", - "token_name_required": "Please enter a token name", + "description_suffix": ". Each user can have up to 10 active API keys.", + "create_token": "Create API Key", + "create_modal_title": "Create API Key", + "token_name": "Name", + "token_name_required": "Please enter a name", "token_name_placeholder": "e.g., CI/CD Pipeline", "permissions": "Permissions", "permissions_required": "Please select at least one permission", @@ -266,11 +266,11 @@ "exp_180": "180 days", "exp_360": "360 days", "create_button": "Create", - "created_title": "Token Created Successfully", + "created_title": "API Key Created Successfully", "created_ok": "I've saved it", - "created_warning": "⚠️ Copy and save this token now. You won't be able to view it again!", + "created_warning": "⚠️ Copy and save this API key now. You won't be able to view it again!", "copied": "Copied to clipboard", - "copy_button": "Copy Token", + "copy_button": "Copy API Key", "mode": "Permission mode", "mode_classic": "Classic (by method)", "mode_scoped": "Fine-grained (by action)", @@ -284,7 +284,7 @@ "scope_version_publish": "Publish/rollback/bind", "scope_version_delete": "Delete versions/packages", "col_apps": "App scope", - "apps_hint": "Empty = all apps; when set, the token can only operate on the selected apps (recommended for per-app CI)", + "apps_hint": "Empty = all apps; when set, the API key can only operate on the selected apps (recommended for per-app CI)", "all_apps": "All apps", "n_apps": "{{count}} app(s)" }, @@ -297,7 +297,7 @@ "endpoint_label": "MCP endpoint", "privacy_notice": "Results go to the client you authorize, which may forward them to the model provider you chose. Grant only the apps you need to debug.", "token_name": "Token name", - "token_name_required": "Please enter a token name", + "token_name_required": "Please enter a name", "token_name_placeholder": "e.g. troubleshooting", "client_id": "Client label", "client_id_required": "Please enter a client label", @@ -337,7 +337,7 @@ "revoke_button": "Revoke", "revoke_title": "Revoke this token?", "revoke_desc": "Clients using it disconnect immediately.", - "revoke_success": "Token revoked", + "revoke_success": "API Key revoked", "revoke_failed": "Revocation failed", "yes": "Yes", "no": "No" @@ -700,7 +700,8 @@ "service_status": "Service Status", "audit_logs": "Audit Logs", "realtime_metrics": "Real-time Metrics", - "api_tokens": "API Tokens", + "automation": "Automation", + "api_tokens": "API Keys", "admin": "Admin", "dynamic_config": "Dynamic Config", "user_management": "User Management", diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.json index 6fec235..d42fdad 100644 --- a/src/i18n/locales/zh-CN.json +++ b/src/i18n/locales/zh-CN.json @@ -220,13 +220,13 @@ "key_pending": "尚未生成 App Key" }, "api_tokens": { - "create_success": "API Token 创建成功", + "create_success": "API Key 创建成功", "create_failed": "创建失败", - "revoke_success": "Token 已撤销", + "revoke_success": "API Key 已撤销", "revoke_failed": "撤销失败", "col_id": "ID", "col_name": "名称", - "col_token": "Token", + "col_token": "API Key", "col_permissions": "权限", "col_expires": "过期时间", "col_last_used": "最后使用", @@ -240,18 +240,18 @@ "never": "永不过期", "never_used": "从未使用", "revoke_title": "确认撤销", - "revoke_desc": "撤销后此 Token 将无法再使用,确定要撤销吗?", + "revoke_desc": "撤销后此 API Key 将无法再使用,确定要撤销吗?", "yes": "确定", "no": "取消", "revoke_button": "撤销", - "title": "API Token 管理", - "description_prefix": "API Token 可用于 CI/CD 流程或自动化脚本中调用", + "title": "API Key 管理", + "description_prefix": "API Key 可用于 CI/CD 流程或自动化脚本中调用", "pushy_api": "Pushy API", - "description_suffix": "。每个用户最多可同时保留 10 个活跃的 Token。", - "create_token": "创建 Token", - "create_modal_title": "创建 API Token", - "token_name": "Token 名称", - "token_name_required": "请输入 Token 名称", + "description_suffix": "。每个用户最多可同时保留 10 个活跃的 API Key。", + "create_token": "创建 API Key", + "create_modal_title": "创建 API Key", + "token_name": "名称", + "token_name_required": "请输入名称", "token_name_placeholder": "例如:CI/CD Pipeline", "permissions": "权限", "permissions_required": "请至少选择一个权限", @@ -266,16 +266,16 @@ "exp_180": "180 天", "exp_360": "360 天", "create_button": "创建", - "created_title": "Token 创建成功", + "created_title": "API Key 创建成功", "created_ok": "我已保存", - "created_warning": "⚠️ 请立即复制并安全保存此 Token,关闭后将无法再次查看!", + "created_warning": "⚠️ 请立即复制并安全保存此 API Key,关闭后将无法再次查看!", "copied": "已复制到剪贴板", - "copy_button": "复制 Token", + "copy_button": "复制 API Key", "mode": "权限模式", "mode_classic": "经典(按方法)", "mode_scoped": "细粒度(按操作)", "scopes": "细粒度权限", - "scopes_hint": "团队成员创建 token 时必须使用细粒度权限,且不能超出自身角色", + "scopes_hint": "团队成员创建 API Key 时必须使用细粒度权限,且不能超出自身角色", "scopes_required": "请至少选择一个权限", "scope_app_read": "读取应用/版本/统计", "scope_app_write": "创建/修改应用设置", @@ -284,7 +284,7 @@ "scope_version_publish": "发布/回滚/绑定", "scope_version_delete": "删除版本/原生包", "col_apps": "应用范围", - "apps_hint": "留空 = 全部应用;选择后此 token 仅能操作所选应用(CI 单应用流水线推荐)", + "apps_hint": "留空 = 全部应用;选择后此 API Key 仅能操作所选应用(CI 单应用流水线推荐)", "all_apps": "全部应用", "n_apps": "{{count}} 个应用" }, @@ -700,7 +700,8 @@ "service_status": "服务状态", "audit_logs": "操作日志", "realtime_metrics": "实时数据", - "api_tokens": "API Token", + "automation": "自动化", + "api_tokens": "API Key", "admin": "管理员", "dynamic_config": "动态配置", "user_management": "用户管理",