- 05 Jan, 2026 40 commits
-
-
shaw authored
-
shaw authored
-
shaw authored
## Summary - 修复账号管理页面组件拆分时遗漏的功能 - 统一所有内联 SVG 为 Icon 组件 - 修复 ProxySelector 选择"无代理"时发送错误值的问题 ## Changes - AccountTableFilters: 添加 Antigravity 平台选项、类型筛选器、inactive 状态 - AccountActionMenu: 恢复重置状态和清除限速按钮 - AccountsView: 修正 handleClearRateLimit 调用正确的 API - ProxySelector: 修复选择"无代理"时发送 null 而不是 0 ## Conflict Resolution - ProxySelector.vue: 采用 PR 分支的正确逻辑(发送 null 而不是 0) 这是正确的修复,因为后端使用 *int64 类型,nil 会触发 ClearProxyID()
-
shaw authored
- 用户允许分组:前端发送空数组而非 null 表示"允许全部" - 账户代理:前端发送 0 而非 null 表示"无代理" - 后端 UpdateAccount/BulkUpdate 正确处理 ProxyID=0 为清除代理
-
IanShaw027 authored
将 handleToggleSchedulable 从 PUT update() 改为 POST setSchedulable(), 后端 PUT 接口不处理 schedulable 字段,导致切换无效。
-
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 行代码 - 提升代码可维护性和一致性 - 统一图标样式和尺寸管理
-
IanShaw027 authored
修复 golangci-lint unused 检查失败
-
longgexx authored
-
longgexx authored
- 允许余额透支策略 ## 问题 - 扣费失败时只记录日志,不阻止请求完成 - 用户可以用极少余额无限次免费使用服务 - 数据库层使用 BalanceGTE 条件防止余额变负,导致余额不足时扣费失败 ## 修复 - 移除 DeductBalance 方法中的 BalanceGTE 条件,允许余额变为负数 - 修改错误返回:用户不存在时返回 ErrUserNotFound - 实现透支策略:余额不足时允许本次请求完成,余额变负后阻止后续请求 ## 测试 - 更新 TestDeductBalance_InsufficientFunds 测试,验证透支功能 - 更新 TestDeductBalance_NotFound 测试,验证正确的错误类型 - 新增 TestDeductBalance_AllowsOverdraft 测试,专门测试透支场景 - 所有测试通过
✅ -
ianshaw authored
-
-
yangjianbo authored
修复 golangci-lint gofmt 检查失败,移除 AllowInsecureHTTP 字段后多余的空格。
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Sonnet 4.5 <noreply@anthropic.com>
-
程序猿MT authored
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
当挂载的源文件不存在时,Docker 会自动创建同名目录而非文件。 将配置文件挂载默认注释,用户需要时先创建文件再取消注释。
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
shaw authored
-
yangjianbo authored
- docker-compose.yml 配置文件挂载路径改为 ${CONFIG_FILE:-./config.yaml} - .env.example 添加 CONFIG_FILE 配置项,方便用户指定自定义配置文件🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
yangjianbo authored
在 style-src 中添加 fonts.googleapis.com,在 font-src 中添加 fonts.gstatic.com,解决浏览器控制台因 CSP 策略阻止加载 Google Fonts 样式表的错误。
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude Opus 4.5 <noreply@anthropic.com>
-
yangjianbo authored
-
Yuhao Jiang authored
在用户列表中添加可选的 ID 列,方便与其他页面(如订阅管理) 显示的"用户 #ID"进行对照定位。 - ID 列位于用户列之后 - 支持排序 - 可在列设置中隐藏
🤖 Generated with [Claude Code](https://claude.ai/code ) Co-Authored-By:Claude <noreply@anthropic.com>
-
yangjianbo authored
-
shaw authored
-
yangjianbo authored
实现 allow_insecure_http 并在关闭校验时执行最小格式验证 - 关闭 allowlist 时要求 URL 可解析且 scheme 合规 - 响应头过滤关闭时使用默认白名单策略 - 更新相关文档、示例与测试覆盖
-
shaw authored
-
shaw authored
-
ianshaw authored
- 创建 Icon.vue 统一管理 SVG 图标(20+ 常用图标) - 修复 AccountActionMenu 中被错误替换为 emoji 的图标 - 修复 ProfileView 和 GroupsView 中的 emoji 图标 - 图标支持 size/strokeWidth 属性,便于复用
-
LLLLLLiulei authored
-
ianshaw authored
-
yangjianbo authored
实现安全开关默认关闭与响应头透传逻辑 - URL 校验与响应头过滤支持开关并覆盖流式路径 - 非流式 Content-Type 透传/默认值按配置生效 - 接入 go test、golangci-lint 与前端 lint/typecheck - 补充相关测试与配置/文档说明
-
ianshaw authored
- 筛选组件保持固定宽度,不再自动拉伸填充 - 左右分布布局,中间自然留空 - 修复 IP 管理页面表头缺失的中文翻译
-
ianshaw authored
- 恢复 API Key、账号、分组、类型、计费类型等列 - 恢复 Token 详情显示(含缓存读写) - 恢复首Token时间、耗时列 - 恢复请求ID列及复制功能
-
Jiahao Luo authored
## Changes ### 1. Enhanced Error Messages - Modified CRS sync error handling to show detailed error messages - Changed from generic "internal error" to "CRS sync failed: <details>" - Helps diagnose connection issues with private CRS deployments ### 2. Security Configuration - Added SECURITY_URL_ALLOWLIST_ALLOW_PRIVATE_HOSTS environment variable - Allows administrators to enable/disable private IP access for CRS sync - Production default: false (secure) - Test environment default: true (convenient for internal testing) ### 3. Flexible Configuration Support - Added config.yaml mount support in both production and test environments - Supports dual configuration methods: * config.yaml for detailed/complex configurations * Environment variables for quick overrides - Priority: ENV vars > config.yaml > defaults ## Use Case Enables CRS sync from internal deployments where CRS resolves to private IPs (e.g., 10.x.x.x, 192.168.x.x) while maintaining security by default. ## Files Modified - backend/internal/handler/admin/account_handler.go - deploy/docker-compose.yml - deploy/docker-compose-test.yml
-
Yuhao Jiang authored
前端显示"密钥已配置,留空以保留当前值",但后端验证逻辑直接 要求该字段非空,导致修改其他设置时报错。 修复方案: - 当 TurnstileSecretKey 为空时,检查 previousSettings 是否有已保存的值 - 如果有,使用已保存的值而非返回错误 - 同时移除重复获取 currentSettings 的代码,直接复用 previousSettings
🤖 Generated with [Claude Code](https://claude.ai/code ) Co-Authored-By:Claude <noreply@anthropic.com>
-
ianshaw authored
- 添加 en.ts 中缺失的 admin.redeem.types 翻译 - RedeemView 状态筛选器添加 expired 选项 - SubscriptionsView 用量进度条添加 null/undefined 兜底 - SubscriptionsView 添加 validity_days 表单校验 - GroupsView/ProxiesView 搜索图标添加 dark mode 样式
-
ianshaw authored
- UserEditModal: 添加 email 必填和 concurrency 最小值校验 - UserAttributesConfigModal: 添加 key/name 必填和 options 非空校验 - GroupsView: 添加 name 必填校验 - ProxiesView: 添加 name/host 必填和 port 范围校验 - UserBalanceModal: 添加 amount 有效性和余额充足性校验 - RedeemView: 添加空兑换码错误提示 - i18n: 添加所有新增校验的中英文翻译
-
ianshaw authored
- UsageView: 恢复 ModelDistributionChart、TokenUsageTrend 图表和粒度选择器 - SubscriptionsView: 添加分配订阅时的用户和分组校验提示 - i18n: 添加 pleaseSelectUser/pleaseSelectGroup 翻译
-
ianshaw authored
- AccountTableFilters: 添加 Antigravity 平台选项、类型筛选器、inactive 状态 - AccountActionMenu: 恢复重置状态和清除限速按钮,添加 dark mode 样式 - AccountsView: 修正 handleClearRateLimit 调用正确的 API
-