- 13 Mar, 2026 1 commit
-
-
Peter authored
-
- 12 Mar, 2026 1 commit
-
-
Peter authored
-
- 11 Mar, 2026 1 commit
-
-
Peter authored
-
- 08 Mar, 2026 1 commit
-
-
bayma888 authored
- UsageTable 用户邮箱改为可点击链接,点击弹出余额变动记录 - 复用 UserBalanceHistoryModal 组件,通过 getById API 获取完整用户信息 - 新增 hideActions prop 隐藏充值/退款按钮(Usage 页面仅查看) - i18n: 新增 clickToViewBalance、failedToLoadUser 词条 (en/zh)
-
- 04 Mar, 2026 1 commit
-
-
xvhuan authored
-
- 01 Mar, 2026 1 commit
-
-
erio authored
Add a doughnut chart showing usage statistics broken down by group on the admin usage records page. The chart appears alongside the existing model distribution chart (2-column grid), with the token usage trend chart moved to a separate full-width row below. Changes: - backend/pkg/usagestats: add GroupStat type - backend/service: add GetGroupStatsWithFilters interface method and implementation - backend/repository: implement GetGroupStatsWithFilters with LEFT JOIN groups - backend/handler: add GetGroupStats handler with full filter support - backend/routes: register GET /admin/dashboard/groups route - backend/tests: add GetGroupStatsWithFilters stubs to contract/sora tests - frontend/types: add GroupStat interface - frontend/api: add getGroupStats API function and types - frontend/components: add GroupDistributionChart.vue doughnut chart - frontend/views: update UsageView layout and load group stats in parallel - frontend/i18n: add groupDistribution, group, noGroup keys (zh + en)
-
- 28 Feb, 2026 1 commit
-
-
yangjianbo authored
-
- 27 Feb, 2026 1 commit
-
-
shaw authored
-
- 14 Feb, 2026 1 commit
-
-
yangjianbo authored
-
- 07 Feb, 2026 1 commit
-
-
shaw authored
-
- 03 Feb, 2026 1 commit
-
-
ducky authored
-
- 02 Feb, 2026 1 commit
-
-
song authored
-
- 19 Jan, 2026 1 commit
-
-
墨颜 authored
- 将 usage log DTO 拆分为用户/管理员两类 - 用户接口不返回 account_rate_multiplier/ip_address/account - 管理员接口保留管理员字段 - 补充契约测试防止回归
-
- 18 Jan, 2026 1 commit
-
-
yangjianbo authored
-
- 15 Jan, 2026 1 commit
-
-
yangjianbo authored
-
- 14 Jan, 2026 2 commits
-
-
longgexx authored
修复两个问题: 1. Token使用趋势图和模型分布图未响应筛选条件 2. 上午时段选择今天刷新后日期回退到前一天 前端修改: - 更新 dashboard API 类型定义,添加 model、account_id、group_id、stream 参数支持 - 修改 UsageView 趋势图加载逻辑,传递所有筛选参数到后端 - 修复日期格式化函数,使用本地时区避免 UTC 转换导致的日期偏移 后端修改: - Handler 层:接收并解析所有筛选参数(model、account_id、group_id、stream) - Service 层:传递完整的筛选参数到 Repository 层 - Repository 层:SQL 查询动态添加所有过滤条件 - 更新接口定义和所有调用点以保持一致性 影响范围: - /admin/dashboard/trend 端点现支持完整筛选 - /admin/dashboard/models 端点现支持完整筛选 - 用户在后台使用记录页面选择任意筛选条件时,趋势图和模型分布图会实时响应 - 日期选择器在任何时区下都能正确保持今天的选择
-
墨颜 authored
- 新增 accounts.rate_multiplier(默认 1.0,允许 0) - 使用 usage_logs.account_rate_multiplier 记录倍率快照,避免历史回算 - 统计/导出/管理端展示账号口径费用(total_cost * account_rate_multiplier)
-
- 09 Jan, 2026 2 commits
-
-
Edric.Li authored
* feat(api-key): add IP whitelist/blacklist restriction and usage log IP tracking - Add IP restriction feature for API keys (whitelist/blacklist with CIDR support) - Add IP address logging to usage logs (admin-only visibility) - Remove billing_type column from usage logs UI (redundant) - Use generic "Access denied" error message for security Backend: - New ip package with IP/CIDR validation and matching utilities - Database migrations for ip_whitelist, ip_blacklist (api_keys) and ip_address (usage_logs) - Middleware IP restriction check after API key validation - Input validation for IP/CIDR patterns on create/update Frontend: - API key form with enable toggle for IP restriction - Shield icon indicator in table for keys with IP restriction - Removed billing_type filter and column from usage views * fix: update API contract tests for ip_whitelist/ip_blacklist fields Add ip_whitelist and ip_blacklist fields to expected JSON responses in API contract tests to match the new API key schema.
-
Edric Li authored
- Add IP restriction feature for API keys (whitelist/blacklist with CIDR support) - Add IP address logging to usage logs (admin-only visibility) - Remove billing_type column from usage logs UI (redundant) - Use generic "Access denied" error message for security Backend: - New ip package with IP/CIDR validation and matching utilities - Database migrations for ip_whitelist, ip_blacklist (api_keys) and ip_address (usage_logs) - Middleware IP restriction check after API key validation - Input validation for IP/CIDR patterns on create/update Frontend: - API key form with enable toggle for IP restriction - Shield icon indicator in table for keys with IP restriction - Removed billing_type filter and column from usage views
-
- 08 Jan, 2026 1 commit
-
-
Edric Li authored
- Add user_agent field to UsageLog DTO and mapper - Display User-Agent column in admin and user usage tables - Add formatUserAgent helper to show friendly client names - Include user_agent in Excel export - Remove request_id column from admin usage table
-
- 07 Jan, 2026 1 commit
-
-
shaw authored
问题修复: - 恢复 Cost Tooltip 的成本分项明细 (input_cost, output_cost, cache 成本) - 修复 Token Tooltip 双分隔线显示问题 - 修复 Tooltip 翻译键缺失问题,新增 costDetails/tokenDetails - 恢复 Excel 导出格式化 (aoa_to_sheet + 翻译列头) 功能优化: - 账号筛选从前端搜索改为后端搜索,避免一次加载 1000 条数据 - 行为与用户/API Key 筛选保持一致 (debounce + 后端分页)
-
- 06 Jan, 2026 2 commits
-
-
yangjianbo authored
- 修复 AccountTableFilters.vue 中的 vue/no-mutating-props 错误,使用 emit 模式替代直接修改 props - 修复 TypeScript 类型错误,支持 Select 组件的 null 值类型 - 为所有空 catch 块添加错误日志,提升代码可维护性和调试能力 - 涉及文件:AccountTableFilters.vue, UserAllowedGroupsModal.vue, UserApiKeysModal.vue, UserBalanceModal.vue, AccountsView.vue, UsageView.vue, DashboardView.vue, ProfileView.vue
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
yangjianbo authored
主要改动: - 固定 Go 1.25.5 与 CI 校验并更新扫描流程 - 升级 quic-go、x/crypto、req 等依赖并通过 govulncheck - 强化 JWT 校验、TLS 配置与 xlsx 动态加载 - 新增审计豁免清单与校验脚本
-
- 05 Jan, 2026 2 commits
-
-
song authored
- 新增 Group 图片价格配置(image_price_1k/2k/4k) - BillingService 新增 CalculateImageCost 方法 - AntigravityGatewayService 支持识别图片生成模型并按次计费 - UsageLog 新增 image_count 和 image_size 字段 - 前端分组管理支持配置图片价格(antigravity 和 gemini 平台) - 图片计费复用通用计费能力(余额检查、扣费、倍率、订阅限额)
-
ianshaw authored
- UsageView: 恢复 ModelDistributionChart、TokenUsageTrend 图表和粒度选择器 - SubscriptionsView: 添加分配订阅时的用户和分组校验提示 - i18n: 添加 pleaseSelectUser/pleaseSelectGroup 翻译
-
- 04 Jan, 2026 2 commits
-
-
IanShaw027 authored
- Split UsersView.vue into UserCreateModal, UserEditModal, UserApiKeysModal, etc. - Split UsageView.vue into UsageStatsCards, UsageFilters, UsageTable, etc. - Split DashboardView.vue into UserDashboardStats, UserDashboardCharts, etc. - Split AccountsView.vue into AccountTableActions, AccountTableFilters, etc. - Standardized TypeScript types across new components to resolve implicit 'any' and 'never[]' errors. - Improved overall frontend maintainability and code clarity.
-
Yuhao Jiang authored
当管理员在比服务器时区更早的时区(如芝加哥 UTC-6)访问使用记录页面时, 由于服务器时区(如中国 UTC+8)已经是"明天",导致最新的记录无法显示。 修复方案: - DateRangePicker: 将日期选择器的 max 限制从"今天"改为"明天" - UsageView: 默认和重置时的 endDate 使用"明天"而非"今天" 这样可以确保跨时区场景下用户能看到所有最新记录。
🤖 Generated with [Claude Code](https://claude.ai/code ) Co-Authored-By:Claude <noreply@anthropic.com>
-
- 29 Dec, 2025 1 commit
-
-
IanShaw027 authored
- 使用 BaseDialog 替代旧版 Modal 组件 - 添加平滑过渡动画和更好的可访问性支持 - 新增 ExportProgressDialog 导出进度弹窗 - 优化所有账号管理和使用记录相关弹窗 - 更新国际化文案,改进用户交互体验 - 精简依赖,减少 package.json 体积
-
- 28 Dec, 2025 2 commits
-
-
IanShaw027 authored
**问题**: - 使用 toISOString() 格式化日期导致UTC时区问题 - 在UTC+8时区凌晨时,日期会显示为前一天 - 日期范围初始化在 onMounted 中导致重复渲染和请求 **修复**: - 统一使用本地时区格式化日期 - 在变量声明时就初始化日期范围,避免延迟初始化 - 移除 initializeDateRange() 函数,直接在声明时设置正确值 - 添加 formatLocalDate() 辅助函数统一日期格式化逻辑 **影响范围**: - 用户仪表盘 (DashboardView) - 管理员仪表盘 (admin/DashboardView) - 用户使用记录 (UsageView) - 管理员使用记录 (admin/UsageView) **效果**: - 日期范围正确包含当天数据 - 避免页面加载时的重复请求 - 改善用户体验,减少不必要的重新渲染
-
IanShaw027 authored
- DataTable组件操作列自适应 - 优化各种Modal弹窗 - 统一API调用方式(AbortSignal) - 添加全局订阅状态管理 - 优化各管理视图的交互和布局 - 修复国际化翻译问题
-
- 27 Dec, 2025 2 commits
-
-
IanShaw027 authored
- 改进账户管理视图 - 优化分组管理界面 - 完善代理管理功能 - 增强兑换码管理 - 改进订阅管理视图 - 优化使用统计展示 - 完善用户管理界面
-
IanShaw authored
* feat(frontend): 前端界面优化与使用统计功能增强 主要改动: 1. 表格布局统一优化 - 新增 TablePageLayout 通用布局组件 - 统一所有管理页面的表格样式和交互 - 优化 DataTable、Pagination、Select 等通用组件 2. 使用统计功能增强 - 管理端: 添加完整的筛选和显示功能 - 用户端: 完善 API Key 列显示 - 后端: 优化使用统计数据结构和查询 3. 账户组件优化 - 优化 AccountStatsModal、AccountUsageCell 等组件 - 统一进度条和统计显示样式 4. 其他改进 - 完善中英文国际化 - 统一页面样式和交互体验 - 优化各视图页面的响应式布局 * fix(test): 修复 stubUsageLogRepo.ListWithFilters 测试 stub 测试用例 GET /api/v1/usage 返回 500 是因为 stub 方法未实现, 现在正确返回基于 UserID 过滤的日志数据。 * feat(frontend): 统一日期时间显示格式 **主要改动**: 1. 增强 utils/format.ts: - 新增 formatDateOnly() - 格式: YYYY-MM-DD - 新增 formatDateTime() - 格式: YYYY-MM-DD HH:mm:ss 2. 全局替换视图中的格式化函数: - 移除各视图中的自定义 formatDate 函数 - 统一导入使用 @/utils/format 中的函数 - created_at/updated_at 使用 formatDateTime - expires_at 使用 formatDateOnly 3. 受影响的视图 (8个): - frontend/src/views/user/KeysView.vue - frontend/src/views/user/DashboardView.vue - frontend/src/views/user/UsageView.vue - frontend/src/views/user/RedeemView.vue - frontend/src/views/admin/UsersView.vue - frontend/src/views/admin/UsageView.vue - frontend/src/views/admin/RedeemView.vue - frontend/src/views/admin/SubscriptionsView.vue **效果**: - 日期统一显示为 YYYY-MM-DD - 时间统一显示为 YYYY-MM-DD HH:mm:ss - 提升可维护性,避免格式不一致 * fix(frontend): 补充遗漏的时间格式化统一 **补充修复**(基于 code review 发现的遗漏): 1. 增强 utils/format.ts: - 新增 formatTime() - 格式: HH:mm 2. 修复 4 个遗漏的文件: - src/views/admin/UsersView.vue * 删除 formatExpiresAt(),改用 formatDateTime() * 修复订阅过期时间 tooltip 显示格式不一致问题 - src/views/user/ProfileView.vue * 删除 formatMemberSince(),改用 formatDate(date, 'YYYY-MM') * 统一会员起始时间显示格式 - src/views/user/SubscriptionsView.vue * 修改 formatExpirationDate() 使用 formatDateOnly() * 保留天数计算逻辑 - src/components/account/AccountStatusIndicator.vue * 删除本地 formatTime(),改用 utils/format 中的统一函数 * 修复 rate limit 和 overload 重置时间显示 **验证**: - TypeScript 类型检查通过 ✓ - 前端构建成功 ✓ - 所有剩余的 toLocaleString() 都是数字格式化,属于正确用法 ✓ **效果**: - 订阅过期时间统一为 YYYY-MM-DD HH:mm:ss - 会员起始时间统一为 YYYY-MM - 重置时间统一为 HH:mm - 消除所有不规范的原生 locale 方法调用
-
- 26 Dec, 2025 1 commit
-
-
ianshaw authored
- 移除语句末尾分号,规范代码格式 - 优化组件结构和类型定义 - 改进视图文档和示例 - 提升代码一致性
-
- 20 Dec, 2025 1 commit
-
-
shaw authored
-
- 19 Dec, 2025 2 commits
-
-
shaw authored
-
dexcoder6 authored
- 修复移动端无法打开菜单栏的问题 - 在 app.ts 中添加 mobileOpen 状态管理 - 修复 AppHeader.vue 中移动端菜单按钮调用错误的方法 - 修复 AppSidebar.vue 使用本地 ref 而非全局状态的问题 - 添加移动端菜单自动关闭功能 - 点击菜单项后自动关闭侧边栏 - 添加 150ms 延迟以显示关闭动画 - 修复使用记录页面总消费卡片溢出问题 - 调整总消费卡片布局,将删除线价格移至说明行 - 添加 min-w-0 flex-1 防止内容溢出 - 保持与其他卡片高度一致
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Sonnet 4.5 <noreply@anthropic.com>
-
- 18 Dec, 2025 2 commits