erio
63f539b382
fix: merge general improvements from release branch
...
Backend:
- gateway_handler: pass subject.UserID instead of int64(0) for user-level routing
- setting_handler: add missing BalanceLowNotifyRechargeURL to UpdateSettings response
- openai_gateway_service: use applyAccountStatsCost for account stats pricing integration
- embed_on: add local file override (data/public/) for embedded frontend assets
Frontend:
- useTableSelection: add batchUpdate method for batch operations
- AccountsView: virtual scrolling params, Set-based isSelected, swipe virtualization
- ProxiesView: add batchUpdate to selection and swipe-select
- BulkEditAccountModal: fix submit handler to prevent event object as argument
- SettingsView: move payload construction outside try block
- i18n: add general translation keys (saved, deleted, view, validation, allowUserRefund)
- api/client: reorder error fields for consistency
- stores/payment: clarify pollOrderStatus JSDoc
2026-04-14 19:29:37 +08:00
shaw
9648c4323f
fix(frontend): resolve TS2352 type assertion error in API client
2026-04-12 18:06:40 +08:00
erio
faee59ee15
fix(payment): propagate reason/metadata in API error responses
...
The API client's error interceptor was dropping the reason and metadata
fields from backend error responses. This caused PaymentView to miss
specific error codes (TOO_MANY_PENDING, CANCEL_RATE_LIMITED) and fall
back to generic error messages.
2026-04-11 17:51:06 +08:00
erio
947800b95f
fix: bulk edit mixed channel warning not showing confirmation dialog
...
The response interceptor in client.ts transforms errors into plain
objects {status, code, message}, but catch blocks were checking
error.response?.status (AxiosError format) which never matched.
- Add error field passthrough in client.ts interceptor
- Refactor BulkEditAccountModal to use pre-check API (checkMixedChannelRisk)
before submit, matching the single edit flow
- Fix EditAccountModal catch blocks to use interceptor error format
- Add bulk-update mixed channel unit tests
2026-03-01 14:25:16 +08:00
shaw
49a3c43741
feat(auth): 实现 Refresh Token 机制
...
- 新增 Access Token + Refresh Token 双令牌认证
- 支持 Token 自动刷新和轮转
- 添加登出和撤销所有会话接口
- 前端实现无感刷新和主动刷新定时器
2026-02-05 12:42:54 +08:00
IanShaw027
11d063e3c4
feat(前端API): 实现运维监控 API 客户端
...
- 新增 ops API 客户端(ops.ts)
- 扩展 settings API 支持 ops 配置
- 更新 admin API 索引导出 ops 模块
- 扩展 API 客户端支持 WebSocket 连接
2026-01-09 20:58:33 +08:00
Yuhao Jiang
f5603b0780
fix: 修复跨时区用户日期范围查询不准确的问题
...
问题:当用户时区与服务器时区不同时,日期范围查询使用服务器时区解析,
导致用户看到的数据与预期不符。
修复方案:
- 前端:所有 GET 请求自动携带用户时区参数
- 后端:新增时区辅助函数,所有日期解析和默认日期范围计算都使用用户时区
- 当用户时区为空或无效时,自动回退到服务器时区
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2026-01-05 20:43:03 -06:00
IanShaw027
aa6f253374
merge: 合并 upstream/main 并解决冲突
...
解决了以下文件的冲突:
- backend/internal/handler/admin/setting_handler.go
- 采用 upstream 的字段对齐风格和 *Configured 字段名
- 添加 EnableIdentityPatch 和 IdentityPatchPrompt 字段
- backend/internal/handler/gateway_handler.go
- 采用 upstream 的 billingErrorDetails 错误处理方式
- frontend/src/api/admin/settings.ts
- 采用 upstream 的 *_configured 字段名
- 添加 enable_identity_patch 和 identity_patch_prompt 字段
- frontend/src/views/admin/SettingsView.vue
- 合并 turnstile_secret_key_configured 字段
- 保留 enable_identity_patch 和 identity_patch_prompt 字段
2026-01-04 23:17:15 +08:00
IanShaw027
6c036d7b59
fix(frontend): 优化前端组件和国际化支持
...
- 添加 Accept-Language 请求头支持后端翻译
- 优化账户状态指示器和测试模态框
- 简化用户属性表单和配置模态框
- 新增多个国际化翻译条目
- 重构管理视图代码,提升可维护性
2026-01-04 20:49:34 +08:00
yangjianbo
bd4bf00856
feat(安全): 强化安全策略与配置校验
...
- 增加 CORS/CSP/安全响应头与代理信任配置
- 引入 URL 白名单与私网开关,校验上游与价格源
- 改善 API Key 处理与网关错误返回
- 管理端设置隐藏敏感字段并优化前端提示
- 增加计费熔断与相关配置示例
测试: go test ./...
2026-01-02 17:40:57 +08:00
ianshaw
f79b0f0fad
style(frontend): 统一 API 模块代码风格
...
- 移除所有语句末尾分号
- 统一对象属性尾随逗号格式
- 优化类型定义导入顺序
- 提升代码一致性和可读性
2025-12-26 00:10:44 -08:00
shaw
642842c29e
First commit
2025-12-18 13:50:39 +08:00