- 04 Jan, 2026 1 commit
-
-
shaw authored
-
- 01 Jan, 2026 2 commits
-
-
Edric Li authored
Migrate the hardcoded wechat field to the new extensible user attributes system and improve the users management UI. Migration: - Add migration 019 to move wechat data to user_attribute_values - Remove wechat field from User entity, DTOs, and API contracts - Clean up wechat-related code from backend and frontend UsersView enhancements: - Add text labels to action buttons (Filter Settings, Column Settings, Attributes Config) for better UX - Change status column to show colored dot + Chinese text instead of English text - Add dynamic attribute columns support with batch loading - Add column visibility settings with localStorage persistence - Add filter settings modal for search and filter preferences - Update i18n translations
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
IanShaw027 authored
- 新增 drive_client_test.go:Drive API 客户端单元测试 - 新增 gemini_oauth_service_test.go:OAuth 服务单元测试 - 重构 account_handler.go:改进 RefreshTier API 实现 - 优化 drive_client.go:增强错误处理和重试逻辑 - 完善 repository 和 service 层:支持批量 tier 刷新 - 更新迁移文件编号:017 -> 024(避免冲突)
-
- 31 Dec, 2025 1 commit
-
-
shaw authored
- 添加 normalizeLimit 函数,将 0 或负数限额规范化为 nil(无限制) - 简化 IncrementUsage,移除冗余的配额检查逻辑 - 配额检查已在请求前由中间件和网关完成 - 消费记录应无条件执行,确保数据完整性 - 删除测试限额超出行为的无效集成测试
-
- 29 Dec, 2025 1 commit
-
-
yangjianbo authored
避免软删除钩子类型断言失败导致 500\n删除无记录时返回未找到错误并记录日志
-
- 28 Dec, 2025 1 commit
-
-
IanShaw027 authored
**功能概述**: 实现简易模式(Simple Mode),为个人用户和小团队提供简化的使用体验,隐藏复杂的分组、订阅、配额等概念。 **后端改动**: 1. 配置系统 - 新增 run_mode 配置项(standard/simple) - 支持环境变量 RUN_MODE - 默认值为 standard 2. 数据库初始化 - 自动创建3个默认分组:anthropic-default、openai-default、gemini-default - 默认分组配置:无并发限制、active状态、非独占 - 幂等性保证:重复启动不会重复创建 3. 账号管理 - 创建账号时自动绑定对应平台的默认分组 - 如果未指定分组,自动查找并绑定默认分组 **前端改动**: 1. 状态管理 - authStore 新增 isSimpleMode 计算属性 - 从后端API获取并同步运行模式 2. UI隐藏 - 侧边栏:隐藏分组管理、订阅管理、兑换码菜单 - 账号管理页面:隐藏分组列 - 创建/编辑账号对话框:隐藏分组选择器 3. 路由守卫 - 限制访问分组、订阅、兑换码相关页面 - 访问受限页面时自动重定向到仪表板 **配置示例**: ```yaml run_mode: simple run_mode: standard ``` **影响范围**: - 后端:配置、数据库迁移、账号服务 - 前端:认证状态、路由、UI组件 - 部署:配置文件示例 **兼容性**: - 简易模式和标准模式可无缝切换 - 不需要数据迁移 - 现有数据不受影响
-
- 27 Dec, 2025 1 commit
-
-
shaw authored
原逻辑先执行 Update 再验证 GroupIDs,如果验证失败会导致账号已更新但返回错误。 现改为先验证分组是否存在,再执行 Update 和 BindGroups。
-
- 26 Dec, 2025 1 commit
-
-
Forest authored
-
- 25 Dec, 2025 4 commits
- 24 Dec, 2025 1 commit
-
-
Forest authored
-
- 23 Dec, 2025 2 commits
-
-
dexcoder6 authored
## 功能特性 ### 前端 - 在用户列表操作列添加充值和退款按钮 - 实现充值/退款对话框,支持输入金额和备注 - 从编辑用户表单中移除余额字段,防止直接修改 - 添加余额不足验证,实时显示操作后余额 - 优化备注提示词,提供多种场景示例 ### 后端 - 为 redeem_codes 表添加 notes 字段(迁移文件) - 在 UpdateUserBalance 接口添加 notes 参数支持 - 添加余额验证:金额必须大于0,操作后余额不能为负 - UpdateUser 接口移除 balance 字段处理,防止误操作 - 完整的审计日志和缓存管理 ## 安全保护 - 前端:余额不足时禁用提交按钮,实时提示 - 后端:双重验证(输入金额 > 0 + 结果余额 >= 0) - 权限:仅管理员可访问(AdminAuth 中间件) - 审计:所有操作记录到 redeem_codes 表 ## 修改文件 后端: - backend/migrations/004_add_redeem_code_notes.sql - backend/internal/model/redeem_code.go - backend/internal/service/admin_service.go - backend/internal/handler/admin/user_handler.go 前端: - frontend/src/views/admin/UsersView.vue - frontend/src/api/admin/users.ts - frontend/src/i18n/locales/zh.ts - frontend/src/i18n/locales/en.ts
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-authored-by:Claude Sonnet 4.5 <noreply@anthropic.com>
-
dexcoder6 authored
- 新增User模型字段:username(用户名)、wechat(微信号)、notes(备注) - 扩展用户搜索功能,支持通过用户名和微信号搜索 - 添加用户个人资料更新功能,用户可自行编辑用户名和微信号 - 管理员用户列表新增用户名、微信号、备注显示列 - 备注字段仅对管理员可见,增强数据安全性 - 完善中英文国际化翻译 - 修复国际化文件中重复属性的TypeScript错误
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Sonnet 4.5 <noreply@anthropic.com>
-
- 20 Dec, 2025 4 commits
-
-
Forest authored
-
Forest authored
-
NepetaLemon authored
## 变更内容 ### CI/CD - 添加 GitHub Actions 工作流(test + golangci-lint) - 添加 golangci-lint 配置,启用 errcheck/govet/staticcheck/unused/depguard - 通过 depguard 强制 service 层不能直接导入 repository ### 错误处理修复 - 修复 CSV 写入、SSE 流式输出、随机数生成等未处理的错误 - GenerateRedeemCode() 现在返回 error ### 资源泄露修复 - 统一使用 defer func() { _ = xxx.Close() }() 模式 ### 代码清理 - 移除未使用的常量 - 简化 nil map 检查 - 统一代码格式 -
Forest authored
-
- 19 Dec, 2025 1 commit
-
-
Forest authored
-
- 18 Dec, 2025 2 commits