refactor(admin-web): polish Chinese UI and bits-ui controls

Map roles to Chinese labels, remove ADR/spec wording from the surface, and replace native selects/checkboxes/modals with bits-ui Select, Checkbox, Switch, Dialog, Label, and Collapsible.
This commit is contained in:
2026-07-11 12:46:54 +08:00
parent 552c1c353e
commit 0968545b5a
17 changed files with 586 additions and 235 deletions
+30 -8
View File
@@ -5,18 +5,40 @@ export interface ToolOption {
}
export const TOOL_OPTIONS: ToolOption[] = [
{ id: 'read_file', label: '读取文件 (Read)', group: '文件' },
{ id: 'write_file', label: '写入文件 (Write)', group: '文件' },
{ id: 'list_files', label: '列目录 (Glob)', group: '文件' },
{ id: 'search_files', label: '搜索 (Grep)', group: '文件' },
{ id: 'read_file', label: '读取文件', group: '文件' },
{ id: 'write_file', label: '写入文件', group: '文件' },
{ id: 'list_files', label: '列目录', group: '文件' },
{ id: 'search_files', label: '搜索', group: '文件' },
{ id: 'bash', label: 'Bash 命令', group: 'Shell' },
{ id: 'cph_check', label: 'cph check', group: 'CPH' },
{ id: 'cph_build', label: 'cph build', group: 'CPH' },
{ id: 'send_file', label: '发送文件 (飞书)', group: '飞书 MCP' },
{ id: 'feishu_read_context', label: '读飞书上下文', group: '飞书 MCP' },
{ id: 'feishu_download_resource', label: '下载飞书资源', group: '飞书 MCP' },
{ id: 'request_approval', label: '请求审批', group: '飞书 MCP' }
{ id: 'send_file', label: '发送文件飞书', group: '飞书' },
{ id: 'feishu_read_context', label: '读飞书上下文', group: '飞书' },
{ id: 'feishu_download_resource', label: '下载飞书资源', group: '飞书' },
{ id: 'request_approval', label: '请求审批', group: '飞书' }
];
/** 组织成员角色(接口枚举保持英文,界面用 orgRoleLabel */
export const ORG_ROLES = ['OWNER', 'ADMIN', 'MEMBER'] as const;
export type OrgRole = (typeof ORG_ROLES)[number];
export const ORG_ROLE_LABELS: Record<OrgRole, string> = {
OWNER: '所有者',
ADMIN: '管理员',
MEMBER: '成员'
};
/** 项目团队授权角色(接口枚举保持英文,界面用 permissionRoleLabel */
export const PERMISSION_ROLES = ['READ', 'EDIT', 'MANAGE'] as const;
export type PermissionRole = (typeof PERMISSION_ROLES)[number];
export const PERMISSION_ROLE_LABELS: Record<PermissionRole, string> = {
READ: '只读',
EDIT: '编辑',
MANAGE: '管理'
};
export const PROVIDER_MODES = [
{ value: 'PLATFORM_MANAGED', label: '平台托管' },
{ value: 'BYOK', label: '自带密钥' }
] as const;