Merge PR #70: feat(frontend): 优化弹窗组件架构和用户体验
## 主要变更 ### 对话框系统重构 - 升级 BaseDialog 组件,添加动画、焦点管理、响应式宽度 - 删除旧的 Modal.vue,统一使用 BaseDialog ### 使用量数据导出升级 - 改为 Excel 格式导出,支持分页全量导出 - 添加导出进度对话框,支持取消操作 - 新增依赖:xlsx、file-saver ### 使用量页面优化 - Token 明细悬浮提示 - 请求 ID 一键复制 - 新增 first_token 列 ### 后端修复 - 账户统计查询添加软删除过滤 ## 冲突解决 - 保留 driver.js 依赖(onboarding 功能需要) - 合并 package.json 变更
This commit is contained in:
@@ -326,7 +326,8 @@ export default {
|
||||
customKeyHint: 'Only letters, numbers, underscores and hyphens allowed. Minimum 16 characters.',
|
||||
customKeyTooShort: 'Custom key must be at least 16 characters',
|
||||
customKeyInvalidChars: 'Custom key can only contain letters, numbers, underscores, and hyphens',
|
||||
customKeyRequired: 'Please enter a custom key'
|
||||
customKeyRequired: 'Please enter a custom key',
|
||||
ccSwitchNotInstalled: 'CC-Switch is not installed or the protocol handler is not registered. Please install CC-Switch first or manually copy the API key.'
|
||||
},
|
||||
|
||||
// Usage
|
||||
@@ -345,6 +346,12 @@ export default {
|
||||
allApiKeys: 'All API Keys',
|
||||
timeRange: 'Time Range',
|
||||
exportCsv: 'Export CSV',
|
||||
exportExcel: 'Export Excel',
|
||||
exportingProgress: 'Exporting data...',
|
||||
exportedCount: 'Exported {current}/{total} records',
|
||||
estimatedTime: 'Estimated time remaining: {time}',
|
||||
cancelExport: 'Cancel Export',
|
||||
exportCancelled: 'Export cancelled',
|
||||
exporting: 'Exporting...',
|
||||
preparingExport: 'Preparing export...',
|
||||
model: 'Model',
|
||||
@@ -368,6 +375,8 @@ export default {
|
||||
noDataToExport: 'No data to export',
|
||||
exportSuccess: 'Usage data exported successfully',
|
||||
exportFailed: 'Failed to export usage data',
|
||||
exportExcelSuccess: 'Usage data exported successfully (Excel format)',
|
||||
exportExcelFailed: 'Failed to export usage data',
|
||||
billingType: 'Billing',
|
||||
balance: 'Balance',
|
||||
subscription: 'Subscription'
|
||||
@@ -1291,6 +1300,7 @@ export default {
|
||||
account: 'Account',
|
||||
group: 'Group',
|
||||
requestId: 'Request ID',
|
||||
requestIdCopied: 'Request ID copied',
|
||||
allModels: 'All Models',
|
||||
allAccounts: 'All Accounts',
|
||||
allGroups: 'All Groups',
|
||||
@@ -1300,6 +1310,10 @@ export default {
|
||||
outputCost: 'Output Cost',
|
||||
cacheCreationCost: 'Cache Creation Cost',
|
||||
cacheReadCost: 'Cache Read Cost',
|
||||
inputTokens: 'Input Tokens',
|
||||
outputTokens: 'Output Tokens',
|
||||
cacheCreationTokens: 'Cache Creation Tokens',
|
||||
cacheReadTokens: 'Cache Read Tokens',
|
||||
failedToLoad: 'Failed to load usage records'
|
||||
},
|
||||
|
||||
|
||||
@@ -322,7 +322,8 @@ export default {
|
||||
customKeyHint: '仅允许字母、数字、下划线和连字符,最少16个字符。',
|
||||
customKeyTooShort: '自定义密钥至少需要16个字符',
|
||||
customKeyInvalidChars: '自定义密钥只能包含字母、数字、下划线和连字符',
|
||||
customKeyRequired: '请输入自定义密钥'
|
||||
customKeyRequired: '请输入自定义密钥',
|
||||
ccSwitchNotInstalled: 'CC-Switch 未安装或协议处理程序未注册。请先安装 CC-Switch 或手动复制 API 密钥。'
|
||||
},
|
||||
|
||||
// Usage
|
||||
@@ -341,6 +342,12 @@ export default {
|
||||
allApiKeys: '全部密钥',
|
||||
timeRange: '时间范围',
|
||||
exportCsv: '导出 CSV',
|
||||
exportExcel: '导出 Excel',
|
||||
exportingProgress: '正在导出数据...',
|
||||
exportedCount: '已导出 {current}/{total} 条',
|
||||
estimatedTime: '预计剩余时间:{time}',
|
||||
cancelExport: '取消导出',
|
||||
exportCancelled: '导出已取消',
|
||||
exporting: '导出中...',
|
||||
preparingExport: '正在准备导出...',
|
||||
model: '模型',
|
||||
@@ -364,6 +371,8 @@ export default {
|
||||
noDataToExport: '没有可导出的数据',
|
||||
exportSuccess: '使用数据导出成功',
|
||||
exportFailed: '使用数据导出失败',
|
||||
exportExcelSuccess: '使用数据导出成功(Excel格式)',
|
||||
exportExcelFailed: '使用数据导出失败',
|
||||
billingType: '消费类型',
|
||||
balance: '余额',
|
||||
subscription: '订阅'
|
||||
@@ -1490,6 +1499,7 @@ export default {
|
||||
account: '账户',
|
||||
group: '分组',
|
||||
requestId: '请求ID',
|
||||
requestIdCopied: '请求ID已复制',
|
||||
allModels: '全部模型',
|
||||
allAccounts: '全部账户',
|
||||
allGroups: '全部分组',
|
||||
@@ -1499,6 +1509,10 @@ export default {
|
||||
outputCost: '输出成本',
|
||||
cacheCreationCost: '缓存创建成本',
|
||||
cacheReadCost: '缓存读取成本',
|
||||
inputTokens: '输入 Token',
|
||||
outputTokens: '输出 Token',
|
||||
cacheCreationTokens: '缓存创建 Token',
|
||||
cacheReadTokens: '缓存读取 Token',
|
||||
failedToLoad: '加载使用记录失败'
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user