fengsilin
2757f77011
feat(i18n): 补全服务条款和使用政策的多语言翻译
在 zh-CN、en、zh-TW、ja、fr、ru、vi 七个语言文件中添加
服务条款和使用政策的完整翻译 key。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
hace 2 semanas
fengsilin
1cc75aa9a2
feat: 服务条款和使用政策页面,支持后台 Markdown 配置
复用现有 LegalSettings 模式,新增 TermsOfService 和 UsagePolicy 字段,
添加 /terms 和 /usage-policy 前端页面及 API 端点。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
hace 2 semanas
fengsilin
befde35afa
feat(i18n): 全面国际化前端硬编码中文文本
将 14 个源码文件中的硬编码中文 UI 文本统一包裹到 t()/i18n.t() 调用,
覆盖登录注册、首页、设置页、工具函数等核心模块,并为 7 个语言文件
补充约 80+ 翻译键;修复 zh-CN.json 值误用繁体问题。
Co-Authored-By: Claude <noreply@anthropic.com>
hace 3 semanas
fengsilin
cf2a0a7992
fix(payment): 修复微信支付集成多项问题
- 修复订单号超 32 字符限制(微信支付要求),改用时间戳+随机字符格式
- 修复密钥解析:添加 wrapAsPEM 兼容 PEM/Base64/DER 多种输入格式
- 修复前端:RechargeCard 未识别 enableWechatTopUp 导致充值表单不显示
- 修复前端:支付按钮禁用逻辑未区分 epay/wechat_pay
- 移除状态轮询接口的 CriticalRateLimit 防止 429
- 过滤未启用易支付的旧支付方法避免混淆
- 修复 SiLinkedin 图标不存在导致构建失败
- 简化 webhook 冗余条件判断
- 添加密钥解析相关测试
Co-Authored-By: Claude <noreply@anthropic.com>
hace 3 semanas
fengsilin
00e266cd77
feat(payment): 集成微信支付 Native(扫码支付)V3 API
完整实现微信支付充值和订阅购买功能,支持配置热更新、二维码扫码支付、
回调验签、订单状态轮询,以及管理后台支付网关设置。
后端:
- 新增微信支付 V3 客户端(支持 Base64/文件路径两种密钥加载)
- Native 下单、回调处理、订单状态查询 API
- 充值订单幂等完成(事务+行锁)
- 订阅购买支持微信支付
- 配置变更自动重置客户端
- 提取 createWechatNativeOrder 消除重复下单逻辑
前端:
- 二维码扫码弹窗(含倒计时、自动轮询状态)
- 微信支付设置页面(AppID、商户号、密钥等 12 项配置)
- 充值页集成微信支付流程
依赖:go-pay/gopay v1.5.117
Co-Authored-By: Claude <noreply@anthropic.com>
hace 3 semanas
fengsilin
296edf0f71
fix: 移植上游关键 bug 修复
从 QuantumNous/new-api 上游移植以下修复:
- fix(ssrf): 加固视频代理和 MJ 图片代理的 SSRF 防护,FetchModels 提权至 RootAuth
- fix(claude): 流式断流时不再整份覆盖 usage,保留 cache 计费字段
- fix(pricing): 定价接口增加用户可用分组过滤
- fix(ratio): compact 模型优先匹配精确定价再回退通配符
- fix(ali): 接受 task polling 返回的字符串类型 usage 值
- fix(gemini): 从 URL 路径 :streamGenerateContent 检测流式请求
- fix(zhipu_4v): coding plan 图片生成使用正确的 OpenAI endpoint
- fix(openai): MessageImageUrl.Detail 字段添加 omitempty
- fix(channel-affinity): skip_retry_on_failure 配置项为 false 时不再丢失
- fix(document-renderer): 使用 useMemo 替代 useState 处理 HTML payload
- fix(fetch-setting): ApplyIPFilterForDomain 默认值改为 true
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 4 semanas
fengsilin
9d4a595465
feat(region-sync): Master→Slave 配置同步、热更新与前端修复
- 新增 GET /api/internal/sync/config 接口,Master 下发 MinBalanceThreshold、MaxRetryCount、SyncBatchSize、SyncIntervalSeconds
- Slave 每 5 分钟从 Master 拉取配置并持久化到本地数据库,确保重启不丢失
- 统一 startWorker 支持动态间隔,同步间隔前端修改后无需重启立即生效
- 主节点地址从 TagInput 改为 Form.Input,修复 JSON 数组格式问题
- stringToArray 兼容 JSON 数组和换行分隔两种格式
- 清理根目录测试脚本(已迁移到 test-scripts/)
Co-Authored-By: Claude <noreply@anthropic.com>
hace 4 semanas
fengsilin
1cecd5349d
feat: 跨区域配额同步(Master-Slave Region Sync)
实现 Master-Slave 架构的跨区域用户和配额同步功能,支持国内主节点与
海外从节点之间的用户创建推送、余额同步、预扣费批量回传。
主要变更:
- 新增 region_sync 服务层(SyncManager/SyncClient/推送逻辑)
- User 模型扩展 Source/RemoteUserId/SyncedQuota/LastSyncAt 字段
- BillingSession 支持 SyncedUserFunding 资金来源
- 新增 SyncAuth 中间件(X-Sync-API-Key + 常量时间比较)
- 新增 PendingSyncRecord/QuotaSyncLog 数据模型
- 前端新增区域同步配置面板
- 支持 SESSION_NAME 环境变量避免多节点 cookie 冲突
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 4 semanas
fengsilin
2ea8501938
feat(pricing): 首页定价添加分页并优化渠道 ID 展示
- 首页定价区域添加响应式分页(移动端6/平板8/桌面9)
- 渠道列表显示 ID,支持在名称中查看
- 渠道定价卡片添加 ID 标签和使用提示 Banner
- 代码示例中展示 API Key 指定渠道的格式
Co-Authored-By: Claude <noreply@anthropic.com>
hace 1 mes
fengsilin
4b17a67eea
content: 更新工具链描述文案
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
061423d21c
fix: 修复首页 Footer 无法完整下滑的问题
- 添加 home-snap-section 类让 Footer 参与 scroll snap
- 覆盖 min-height 和 height 为 auto,允许内容自适应
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
8041c22c5a
feat: 添加滚动导航组件
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
9fd8e099aa
style: 隐藏首页 CTA 区域和页脚版权信息
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
a7c7615a71
chore: 更新网站 Logo
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
f700adabb5
style: 重构首页组件样式与布局
- HeroSection: 调整标题字体大小与布局,修复缩进一致性
- ToolsSection: 改为 icon+title 同行布局,更新工具内容
- 移除 ChannelPricingCard 编辑图标和未使用导入
- 统一部分标题添加 font-bold 样式
- 临时注释部分展示元素(版权信息、核心价值标签等)
Co-Authored-By: Claude <noreply@anthropic.com>
hace 1 mes
fengsilin
a95331a85f
chore: 隐藏侧边栏聊天子菜单、账户管理及隐私价格设置
- 注释侧边栏"聊天"子菜单,保留"操练场"
- 隐藏个人设置中的账户管理模块
- 隐藏其他设置中的价格设置和隐私设置Tab
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
bfa55d1b69
chore: 暂时隐藏模型详情页的调用示例组件
注释掉 ModelCodeSnippet 组件的导入和渲染。
Co-Authored-By: Claude <noreply@anthropic.com>
hace 1 mes
fengsilin
62737d3f8c
feat: 添加模型详情页渠道价格展示 & 优化筛选行布局
- 新增 API 端点获取模型在各渠道的定价信息,支持全局价格回退
- 在模型详情侧边栏添加渠道价格卡片,显示所有支持该模型的渠道
- 优化 HorizontalFilterRow 组件,改用 flex-wrap 自动换行布局
- 隐藏数量为 0 的模型类型筛选项
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
96e71a3be4
fix: 支持带供应商前缀的模型名称倍率匹配
当模型名称包含供应商前缀(如 "openai/o3-mini")时,自动尝试去掉前缀重新查找倍率配置。
- 在 GetModelPrice 和 GetModelRatio 函数中添加前缀剥离逻辑
- 在前端倍率配置页面添加提示说明
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
044b5aafea
fix: 改进 RWMap JSON 加载原子性 & UI 文案调整
- types/rw_map.go: 解析失败时不再清空原有数据
- HomePricingFilters: 模型类型标签从"对话"改为"文本"
- makefile: docker-build 目标添加自动 push
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
3a32ab11dd
feat(model): 添加模型类型字段编辑功能
- 后端 Update 函数添加 type 字段支持更新
- 前端 EditModelModal 添加模型类型下拉选择器
- 新增 MODEL_TYPE_OPTIONS 共享常量(与后端 ModelType 一致)
- 添加中英文 i18n 翻译
- 修复首页"全部供应商"计数显示错误的 bug
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
bfa7cc7b97
feat(token): support dynamic channel specification via colon separator
- Add support for sk-{key}:{channelId} format to specify channel dynamically
- Remove BoundChannelId field and related code
- All users can now specify channels, not just admins
- Add model validation when channel is specified
- Remove bound channel UI from token management
Breaking change: tokens can no longer be bound to channels at creation time.
Use sk-{key}:{channelId} format instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
5c57f692a5
feat: enhance channel pricing with price mode and color picker
- Add "by price" sub-mode for per-token pricing (auto-calculate ratios)
- Add color picker with preset colors in tag manager
- Display tags with colors in channel pricing view and selector
- Remove unused function, extract hardcoded color constants
- Fix pricing model filter (status==0 instead of status!=1)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
352806c099
feat: add dedicated API for user channel binding selection
Add a new /api/user/channels endpoint that returns only enabled channels
with non-sensitive fields (id, name, type, remark) for token channel binding.
Update EditTokenModal to use this endpoint and display remark instead of ID
in the channel dropdown.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
69713a92bd
fix: improve channel pricing UI and fix ratio naming
- Rename "输入倍率" to "模型倍率" for model_ratio field
- Rename "输出倍率" to "补全倍率" for completion_ratio field
- Update help text to reflect accurate pricing calculation
- Add search functionality for model filtering
- Improve table expansion behavior
- Fix channel data loading in ModelSettingsVisualEditor
- Conditionally show ratio/price fields based on quota type
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
e5ec592c79
fix: use IconPriceTag instead of IconPrice/Tag
hace 1 mes
fengsilin
0653a8ddc2
feat: add channel binding field to token management and i18n keys
- Add bound_channel_id field to EditTokenModal for channel binding
- Load channels list for dropdown selection
- Add i18n translations for channel pricing features (zh-CN, en)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
b9ccbbcdbe
feat: integrate channel pricing UI into pricing settings
- Add view mode switch (global vs channel) to ModelSettingsVisualEditor
- Create ChannelPricingView component for channel-specific pricing
- Add pricing tag management tab to RatioSetting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
fengsilin
deda039c96
feat: add PricingTagManager component
hace 1 mes
fengsilin
d58cf68cdc
feat: add channel pricing and pricing tag API helpers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hace 1 mes
unknown
bf779f3068
'upgrade'
hace 2 meses
unknown
1b08d03a2f
update icons
hace 2 meses
unknown
e1f10fec95
add localiazed
hace 2 meses
winter
08164cd0ae
fix
hace 2 meses