Commit Graph
19 Commits
Author SHA1 Message Date
abingyydsandClaude Sonnet 4.6 e5ad9ac438 feat: add per-distributor currency display setting (USD/CNY)
Distributors can now choose between USD ($) and CNY (¥) for frontend
price and balance display. Only affects presentation — backend amounts
remain in USD internally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 14:04:56 +08:00
abingyyds de5d047371 Add nested distributor pricing and profit split 2026-04-08 14:17:07 +08:00
abingyydsandClaude Sonnet 4.6 16c42412bc feat: 分站套餐价格改为人民币存储,额度输入简化为人民币金额
- 后端: DistributorPackage.Price/OriginalPrice 改为存 CNY
- 后端: SubscribePackage 购买时自动 CNY→USD 转换再算 quota
- 前端: 套餐表单额度从 quota 单位改为人民币金额输入
- dist-site: 7个主题 + Packages页面去掉 price*rate 转换

计费逻辑不变:CNY/汇率=USD,USD*QuotaPerUnit=quota

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 21:02:31 +09:00
abingyydsandClaude Opus 4.6 f087c0f978 feat: 分站用户调用日志页面
- 新增 DistUserGetLogs 后端接口,支持按模型/令牌筛选和分页
- 新增 dist-site Logs 页面,desktop 表格 + mobile 卡片布局
- 所有 7 个主题 Layout 添加日志导航项
- Dashboard 快捷入口替换为调用日志链接
- 添加中英文 i18n 翻译

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 21:34:56 +09:00
abingyydsandClaude Opus 4.6 c9c711e4f6 feat: 分站前端默认使用人民币显示价格和余额
- 后端 GetDistSiteInfo 返回 currency 配置(符号/汇率/代码)
- SiteContext 新增 useCurrency() hook 提供 symbol/rate/fmt
- Pricing/Dashboard/Topup/Packages 所有价格从 $ 改为 ¥ 并乘以汇率
- 7 个主题的 Home.jsx 套餐价格同步更新

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 17:16:53 +09:00
abingyydsandClaude Sonnet 4.6 31e4bd22e4 fix: 周期性套餐等价计算使用整个有效期的总额度
之前只用了单次周期的 quota 计算等价,导致每日重置套餐(如 $1/天 × 30天)
只显示 $45 等价,实际应该是 $30 总额度 × 45倍 = $1359 等价

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 20:34:15 +09:00
abingyydsandClaude Sonnet 4.6 a6b962084d feat: 官方等价对比改为轮播动效,展示所有匹配模型
- 新增 RotatingEquiv 组件,3秒间隔淡入淡出切换
- calcOfficialEquivList 返回所有匹配模型(含 Gemini 系列)
- Packages 页面和 7 个 Home 模板全部适配轮播

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 17:10:31 +09:00
abingyydsandClaude Sonnet 4.6 3b8206284f feat: 所有模板 Home 页套餐卡片添加官方价格等价对比
提取 calcOfficialEquiv 为公共工具函数,7 个 Home 模板和
Packages 页面共用,自动选择折扣比例最大的模型展示等价额度。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 03:46:01 +09:00
abingyydsandClaude Sonnet 4.6 983c2e7d5f refactor: 重新设计全部 6 个分站主题,参照 minimal 风格
设计原则:
- 每个主题只用 2 个 react-bits 组件(CountUp + FadeContent)
- 去掉 Aurora/Particles/DecryptedText/SplitText/RotatingText 等重动画
- 去掉 SpotlightCard/StarBorder/ShinyText/GradientText/BlurText 堆叠
- 用排版层级和留白代替动画效果
- 每个主题保持独特个性和配色

各主题定位:
- starter: indigo 品牌色,居中 hero,克制的渐变光晕
- default: 紫/蓝色调,居中大标题,白色按钮
- dark: 翡翠绿点缀,左对齐,编号列表功能区
- clean: 蓝色主题白底,清爽留白
- corporate: slate 正式风,分栏统计,深色 CTA 区
- claude: 暖色奶油底/陶土色,编号列表,pill 按钮

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 23:24:37 +09:00
abingyyds 8a6f957843 Revert "feat: 分站货币符号切换功能(¥/$ 可配置,默认人民币)"
This reverts commit 30fb22b9bc29180ee48f1531cffe6293731e2065.
2026-03-21 23:17:45 +09:00
abingyydsandClaude Sonnet 4.6 7a4cbb60d3 feat: 分站货币符号切换功能(¥/$ 可配置,默认人民币)
后端:
- Distributor 模型新增 CurrencySymbol 字段 (default: ¥)
- /api/dist/site/info 响应中返回 currency_symbol
- PUT /api/distributor/self 支持更新 currency_symbol

分站管理后台 (web):
- DistributorSettings 新增货币符号切换 (¥ CNY / $ USD)
- 添加 i18n 翻译 (en/zh/ja/fr/ru/vi)

分站前端 (dist-site):
- Dashboard: 余额、已用额度使用动态符号
- Packages: 套餐价格、原价、订阅余额使用动态符号
- Pricing: 模型输入/输出价格使用动态符号
- Topup: 预设金额、支付金额、历史记录使用动态符号
- 7 个主题 Home 页: 套餐价格展示使用动态符号
- 所有页面通过 useSite().currency_symbol 读取,统一 fallback ¥

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 23:09:46 +09:00
abingyydsandClaude Sonnet 4.6 172a588afe fix: 修复 clean/corporate 主题低对比度文本颜色 + 补充 i18n 翻译
- clean 主题 Home 页: text-gray-400 → text-gray-500 (统计标签、价格、时长)
- corporate 主题 Home 页: text-slate-400 → text-slate-500 (价格划线、时长)
- 补充 en/fr/ja/ru/vi 多语言翻译

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 18:22:12 +09:00
abingyydsandClaude Sonnet 4.6 6e99c12292 feat: 管理员"充值记录"改为"订单记录",新增分站订单查看
- 管理员侧边栏标签从"充值记录"改为"订单记录"
- 新增 Tab 切换:充值订单 / 分站订单
- 后端新增 GET /api/user/dist_orders 管理员接口
- 分站订单表格显示订单类型、金额、折扣比例、站点名称等
- 完善 6 语言 i18n 翻译
- 包含其他 Agent 的 dist-site 样式改动

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 18:08:48 +09:00
abingyydsandClaude Sonnet 4.6 6fc1a5b93c feat: enhance themes with react-bits components & add Claude theme
- Clean theme: added ShinyText badge, BlurText hero, SpotlightCard
  feature cards, StarBorder dashboard button
- Corporate theme: added GradientText hero, ShinyText badge,
  SpotlightCard feature cards and pricing cards
- New 'claude' theme: warm terracotta/coral (#D97757) color scheme
  with cream backgrounds, GradientText, BlurText, ShinyText,
  SpotlightCard, StarBorder - Claude's signature design language
- All themes include full nav with topup, LanguageSwitch, mobile menu

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 17:18:33 +09:00
abingyydsandClaude Sonnet 4.6 a570ecbbcd feat: add clean and corporate white-style theme templates
Add two new white-background themes with distinct design languages:
- Clean: soft blue accents, rounded cards, gradient CTA section
- Corporate: slate/professional palette, sharp borders, structured layout

Both themes include full nav (with topup), LanguageSwitch, FadeContent
animations, model grid, package cards, and responsive mobile menu.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 17:04:01 +09:00
abingyydsandClaude Sonnet 4.6 e981315543 feat: 分站在线充值功能
- 新增 dist_topup.go 控制器,支持易支付/Stripe/Creem/加密货币充值
- 分站模型新增 enable_topup 字段
- 分站前端新增充值页面和导航入口
- 分站设置页新增充值开关
- 添加中英文 i18n 翻译

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 15:21:45 +09:00
abingyydsandClaude Sonnet 4.6 a512c4c344 fix: replace TiltedCard with SpotlightCard in default theme features
TiltedCard requires an imageSrc prop (renders <img>), but was used as
a children container, causing broken image icons. Replaced with
SpotlightCard which properly supports children content.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 14:59:57 +09:00
abingyydsandClaude Sonnet 4.6 662685cc97 feat: add language switch button and optimize theme visuals
- Add LanguageSwitch component to all 4 theme layouts (starter/default/dark/minimal)
- Import Noto Sans SC for proper Chinese font rendering
- Fix theme flash on refresh by blocking render until site info loads
- Optimize default theme: violet/blue/cyan palette, SVG icons instead of emoji
- Optimize dark theme: unified emerald accent, reduced particle count, backdrop-blur
- Add Tailwind safelist for dark theme dynamic class names
- Prioritize localStorage in i18n detection so manual language choice persists

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 10:19:38 +09:00
abingyydsandClaude Sonnet 4.6 01405ca8cf feat: dist-site 多主题模板 + 中英双语 i18n
- 新增 4 套主题模板:starter/default/dark/minimal
  - Starter: 毛玻璃 + GradientText + SpotlightCard (原有风格)
  - Default: Aurora 极光背景 + SplitText + TiltedCard
  - Dark: Particles 粒子 + DecryptedText 赛博朋克风格
  - Minimal: 极简优雅 + FadeContent 淡入动画
- 新增 i18n 中英双语支持 (i18next + browser-languagedetector)
- 新增 ThemeProvider 运行时主题切换 (根据 theme_template 字段)
- 新增 11 个 react-bits 动画组件
- 所有页面文案国际化 (Login/Register/Dashboard/Tokens/Pricing/Packages)
- 新增 README.md + README.zh.md 含主题切换指南

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 09:04:25 +09:00