1. 14 Feb, 2026 1 commit
  2. 08 Feb, 2026 1 commit
    • shaw's avatar
      feat(ui): 用户列表页显示当前并发数 · e4d74ae1
      shaw authored
      优化 /admin/users 页面的并发数列,显示「当前/最大」格式,
      参考 AccountCapacityCell 的设计风格。
      
      - 后端 UserHandler 注入 ConcurrencyService,批量查询用户当前并发数
      - 新增 UserConcurrencyCell 组件,支持颜色状态(空闲灰/使用中黄/满载红)
      - 前端 AdminUser 类型添加 current_concurrency 字段
      e4d74ae1
  3. 06 Feb, 2026 1 commit
  4. 02 Feb, 2026 1 commit
  5. 26 Jan, 2026 1 commit
    • shaw's avatar
      feat(auth): 实现 TOTP 双因素认证功能 · 1245f07a
      shaw authored
      新增功能:
      - 支持 Google Authenticator 等应用进行 TOTP 二次验证
      - 用户可在个人设置中启用/禁用 2FA
      - 登录时支持 TOTP 验证流程
      - 管理后台可全局开关 TOTP 功能
      
      安全增强:
      - TOTP 密钥使用 AES-256-GCM 加密存储
      - 添加 TOTP_ENCRYPTION_KEY 配置项,必须手动配置才能启用功能
      - 防止服务重启导致加密密钥变更使用户无法登录
      - 验证失败次数限制,防止暴力破解
      
      配置说明:
      - Docker 部署:在 .env 中设置 TOTP_ENCRYPTION_KEY
      - 非 Docker 部署:在 config.yaml 中设置 totp.encryption_key
      - 生成密钥命令:openssl rand -hex 32
      1245f07a
  6. 07 Jan, 2026 1 commit
  7. 06 Jan, 2026 1 commit
    • shaw's avatar
      fix: Token 统计支持 M 单位并修复 lint 错误 · 752882a0
      shaw authored
      - 用户仪表盘 Token 统计卡片支持 K/M 单位自动切换
      - 更新 formatTokensK 工具函数支持百万级显示
      - 修复 setup.go 中未检查返回值的 errcheck 错误
      752882a0
  8. 05 Jan, 2026 2 commits
    • IanShaw027's avatar
      refactor(frontend): 完成所有组件的内联SVG统一替换为Icon组件 · 4251a5a4
      IanShaw027 authored
      - 扩展 Icon.vue 组件,新增 60+ 图标路径
        - 导航类: arrowRight, arrowLeft, arrowUp, arrowDown, chevronUp, externalLink
        - 状态类: checkCircle, xCircle, exclamationCircle, exclamationTriangle, infoCircle
        - 用户类: user, userCircle, userPlus, users
        - 文档类: document, clipboard, copy, inbox
        - 操作类: download, upload, filter, sort
        - 安全类: key, lock, shield
        - UI类: menu, calendar, home, terminal, gift, creditCard, mail
        - 数据类: chartBar, trendingUp, database, cube
        - 其他: bolt, sparkles, cloud, server, sun, moon, book 等
      
      - 重构 56 个 Vue 组件,用 Icon 组件替换内联 SVG
        - 净减少约 2200 行代码
        - 提升代码可维护性和一致性
        - 统一图标样式和尺寸管理
      4251a5a4
    • ianshaw's avatar
      fix(frontend): 完善表单校验并添加错误提示 · 85f53ef2
      ianshaw authored
      - UserEditModal: 添加 email 必填和 concurrency 最小值校验
      - UserAttributesConfigModal: 添加 key/name 必填和 options 非空校验
      - GroupsView: 添加 name 必填校验
      - ProxiesView: 添加 name/host 必填和 port 范围校验
      - UserBalanceModal: 添加 amount 有效性和余额充足性校验
      - RedeemView: 添加空兑换码错误提示
      - i18n: 添加所有新增校验的中英文翻译
      85f53ef2
  9. 04 Jan, 2026 4 commits
    • IanShaw027's avatar
      fix(frontend): 修复前端重构后的样式一致性和功能完整性 · 64b52c43
      IanShaw027 authored
      ## 修复内容
      
      ### 1. AccountsView 功能恢复
      - 恢复3个缺失的模态框组件:
        - ReAuthAccountModal.vue - 重新授权功能
        - AccountTestModal.vue - 测试连接功能
        - AccountStatsModal.vue - 查看统计功能
      - 恢复 handleTest/handleViewStats/handleReAuth 调用模态框
      - 修复 UpdateAccountRequest 类型定义(添加 schedulable 字段)
      
      ### 2. DashboardView 修复
      - 恢复 formatBalance 函数(支持千位分隔符显示)
      - 为 UserDashboardStats 添加完整 Props 类型定义
      - 为 UserDashboardRecentUsage 添加完整 Props 类型定义
      - 优化格式化函数到共享 utils/format.ts
      
      ### 3. 类型安全增强
      - 修复 UserAttributeOption 索引签名兼容性
      - 移除未使用的类型导入
      - 所有组件 Props 类型完整
      
      ## 验证结果
      -  TypeScript 类型检查通过(0 errors)
      -  vue-tsc 检查通过(0 errors)
      -  所有样式与重构前100%一致
      -  所有功能完整恢复
      
      ## 影响范围
      - AccountsView: 代码行数从974行优化到189行(提升80.6%可维护性)
      - DashboardView: 保持组件化同时恢复所有原有功能
      - 深色模式支持完整
      - 所有颜色方案和 SVG 图标保持一致
      
      Closes #149
      64b52c43
    • IanShaw027's avatar
      refactor(frontend): comprehensive architectural optimization and base component extraction · 99308ab4
      IanShaw027 authored
      - Standardized table loading logic with enhanced useTableLoader.
      - Unified form submission patterns via new useForm composable.
      - Extracted common UI components: SearchInput and StatusBadge.
      - Centralized common interface definitions in types/index.ts.
      - Achieved TypeScript zero-error status across refactored files.
      - Greatly improved code reusability and maintainability.
      99308ab4
    • IanShaw027's avatar
      refactor(frontend): comprehensive split of large view files into modular components · e99063e1
      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.
      e99063e1
    • IanShaw027's avatar
      fix(frontend): 优化前端组件和国际化支持 · 6c036d7b
      IanShaw027 authored
      - 添加 Accept-Language 请求头支持后端翻译
      - 优化账户状态指示器和测试模态框
      - 简化用户属性表单和配置模态框
      - 新增多个国际化翻译条目
      - 重构管理视图代码,提升可维护性
      6c036d7b
  10. 01 Jan, 2026 1 commit