Commit Graph
19 Commits
Author SHA1 Message Date
abingyyds fa940f8a51 sync: update dist-site from subtree 2026-05-03 23:47:23 +08:00
abingyyds 5a35fb2100 Add API endpoint links to home pages 2026-04-28 18:58:16 +08:00
abingyyds b850a5d709 Separate distributor banner and notifications 2026-04-25 11:38:14 +08:00
abingyyds 0cc3b941c5 Add Hermes config export 2026-04-24 18:04:22 +08:00
abingyyds 3e2585e241 Fix dist-site config exporter presets 2026-04-19 03:34:19 +08:00
abingyyds 711fd338fd fix: theme dist-site config exporter selects 2026-04-17 01:36:45 +08:00
abingyyds 4b4f4d3b3c Fix dist-site API URL hints and package subscribe UX 2026-04-15 20:14:06 +08:00
abingyyds e6e1a0e45a Restore dist-site config exporter on tokens page 2026-04-15 17:23:04 +08:00
abingyydsandClaude Sonnet 4.6 d8eac39f9a fix: 分站弹窗透明背景改为不透明 + 删除配置文件生成器
- 新增 .modal-overlay CSS 类,为暗色/亮色/claude 主题提供不透明弹窗背景
- 所有弹窗(Topup/Tokens/Packages)添加 modal-overlay 类
- 从 Tokens 页面移除 ConfigExporter 组件及其源文件

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 00:48:19 +08:00
abingyydsandClaude Opus 4.6 179ee855be fix: 优化分站 API Key 页面显示细节
- 移除空状态冗余创建按钮,改为提示点击上方卡片
- 移除 My API Keys 标题栏多余的新建按钮
- ConfigExporter 无 key 时提示改为"请先创建 API Key"
- 修复 KeyGroupCard 推荐/折扣标签颜色适配所有主题

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 23:51:38 +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 b34e81bb58 fix: 共享页面全面适配 light/claude 主题配色
问题:非黑色背景的主题下,共享页面中的灰色/黑色硬编码颜色不协调

修复方案:
1. 扩展 CSS 变量体系:新增 --page-surface, --page-surface-hover,
   --page-divider, --page-inset, --page-success/warning/danger/info
2. .theme-light 和 .theme-claude 各自定义对应的浅色值
3. Tailwind 新增 text-page-success/warning/danger/info 语义色
4. 新增 CSS 工具类: bg-page-surface, hover:bg-page-surface-hover,
   border-page-divider, bg-page-inset

修改文件:
- index.css: 扩展 CSS 变量 + 工具类
- tailwind.config.js: 新增语义色 token
- Dashboard: SpotlightCard → 简单 glass 卡片,hover 色修复
- Pricing: border-white/hover-white → 主题感知类
- Tokens: bg-black/bg-neutral-800 → bg-page-inset/surface
- Topup: SpotlightCard → glass,hover/text 色修复
- ConfigExporter: 下拉菜单/代码预览区全面适配

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 03:48:47 +09:00
abingyydsandClaude Sonnet 4.6 3ed0f67be0 feat: 分站配置导出器模型搜索功能 + i18n 补全
ConfigExporter 模型下拉改为可搜索的自定义 combobox,
新增 config.searchModel / config.noModelMatch i18n 键。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 23:05:07 +09:00
abingyydsandClaude Sonnet 4.6 782439995f feat: 分站 API Key 支持随时查看复制 + 配置文件导出器
- 后端:DistTokenList 去掉 Clean(),返回完整 key 供前端显示
- 前端:Token 列表每行显示完整 key 和复制按钮
- 新增 ConfigExporter 组件,支持 7 种工具配置生成
  (Claude Code / OpenClaw / OpenCode / Cursor / cURL / Python / Anthropic SDK)
- 自动使用分站域名作为 API Base URL
- 中英文 i18n 翻译

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 22:54:52 +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 Opus 4.6 9a18cf2215 chore: remove old dist-site Layout.jsx (replaced by themed templates)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 09:06:35 +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
abingyydsandClaude Sonnet 4.6 cc9a8bcc0e fix: 分站价格单位改为每1M tokens + 移除所有SubRouter主站标识
- 价格表单位从 "per 1K tokens" 改为 "per 1M tokens"(价格×1000显示)
- 移除 footer "Powered by SubRouter" 字样
- 默认站名从 "SubRouter" 改为 "AI Platform"
- HTML title 从 "SubRouter Dist Site" 改为 "AI Platform"
- 分站不再包含任何主站品牌标识

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 06:01:43 +09:00
abingyydsandClaude Sonnet 4.6 9dfc5e79bc feat: 完整分销系统 — 后端 + 主站管理 + 分站前端模板
分销商后端:
- 分销商注册/审核/CRUD API
- 分站用户注册/登录/登出 (session cookie auth)
- 分站 Token CRUD、充值兑换、套餐订阅
- 分站域名/子域名自动识别中间件 (DistIdentify)
- 分销商收益异步记账 + markup 加价计费
- 模型价格快照、渠道路由配置
- 管理员审核/管理分销商

主站前端 (web/):
- 分销商注册申请、设置、客户管理(分页)、套餐管理(含速率限制)
- 收益管理(含汇总卡片+分页列表)、模型管理
- 管理员分销商审核面板
- DistributorLayout 标签页布局 + 路由

分站前端模板 (dist-site/):
- React + Vite + Tailwind 暗色主题 glassmorphism 设计
- react-bits 动画组件 (GradientText, BlurText, CountUp, SpotlightCard 等)
- Session cookie 认证 + New-Api-User header
- 首页/登录/注册/Dashboard/API Keys/定价/套餐 7 个页面
- Token 创建后一次性密钥展示、余额检查订阅确认

Bug 修复:
- 修复 DistUserRegister 密码双重哈希导致用户无法登录
- 修复 401 响应不清除 React user 状态
- 修复订阅确认弹窗不显示余额且提前关闭
- 修复 Home 页 Subscribe 按钮跳转错误 (/dashboard → /packages)
- 修复 Login/Register 组件卸载后 setState 警告
- 修复 DistributorEarnings 引用不存在的 username 字段
- 修复 DistributorCustomers 引用不存在的 created_at 字段

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