diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index a3008136..507c1882 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -499,7 +499,39 @@ export default { invalidResetLink: 'Invalid Reset Link', invalidResetLinkHint: 'This password reset link is invalid or has expired. Please request a new one.', requestNewResetLink: 'Request New Reset Link', - invalidOrExpiredToken: 'The password reset link is invalid or has expired. Please request a new one.' + invalidOrExpiredToken: 'The password reset link is invalid or has expired. Please request a new one.', + narrative: { + common: { + statusLive: 'live', + }, + login: { + kicker: '// you already paid for your subscriptions', + headlineN: 'N', + headlineOne: '1', + headlineSep: 'subscriptions →', + headlineSuffix: 'key', + sub1: 'No more juggling accounts,', + sub2: 'no more paying twice for overlapping subscriptions.', + tagline: 'PURO — AI calls, back to basics.', + }, + register: { + kicker: '// up and running in 5 minutes', + headlineN: 'N', + headlineOne: '1', + headlineSep: 'subscriptions →', + headlineSuffix: 'key', + sub1: 'No more juggling accounts,', + sub2: 'no more paying twice for overlapping subscriptions.', + tagline: 'PURO — AI calls, back to basics.', + stepsTitle: '// next steps', + step1Title: 'Create account', + step1Desc: 'Email + password, or LinuxDO OAuth', + step2Title: 'Connect subscription', + step2Desc: 'OAuth into your existing Claude Pro / ChatGPT Plus', + step3Title: 'Get your API key', + step3Desc: 'Grab your sk-puro-… and swap the SDK\'s base_url', + }, + }, }, // Dashboard @@ -5680,4 +5712,61 @@ export default { }, }, + docs: { + nav: { + products: 'Product', + pricing: 'Pricing', + docs: 'Docs', + login: 'Sign in', + signup: 'Sign up', + }, + hero: { + title: 'Quickstart — PURO AI', + subtitle: 'Three steps: get a key → set base_url → send a request', + }, + sections: { + getKey: { + heading: '1. Get your API key', + desc: 'PURO AI is currently invite-only. Contact the admin to get access:', + note: 'Subscription self-purchase via the iShare portal is coming soon.', + }, + codex: { + heading: '2. Codex CLI setup', + configIntro: 'Edit ~/.codex/config.toml:', + authIntro: 'Then ~/.codex/auth.json:', + verifyIntro: 'Verify:', + copy: 'Copy', + copied: 'Copied', + }, + claudeCode: { + heading: '3. Claude Code setup', + configIntro: 'Edit ~/.claude/settings.json:', + note: 'Claude Code calls the Anthropic-compatible API via the /v1/messages endpoint.', + copy: 'Copy', + copied: 'Copied', + }, + curl: { + heading: '4. curl quick test', + openaiIntro: 'OpenAI Responses API:', + anthropicIntro: 'Anthropic Messages API:', + copy: 'Copy', + copied: 'Copied', + }, + models: { + heading: '5. Available models', + colModel: 'Model', + colPlatform: 'Platform / source', + colContext: 'Context', + colStatus: 'Status', + codexDedicated: 'OpenAI Codex dedicated', + note: 'Pricing is tracked live from model-price-repo. Full list available in the dashboard after signing in.', + noteConsole: 'dashboard', + }, + feedback: { + heading: '6. Feedback', + desc: 'Run into an issue or want a new platform added:', + }, + }, + }, + } diff --git a/frontend/src/i18n/locales/zh.ts b/frontend/src/i18n/locales/zh.ts index 43168bd0..13e192ec 100644 --- a/frontend/src/i18n/locales/zh.ts +++ b/frontend/src/i18n/locales/zh.ts @@ -505,6 +505,38 @@ export default { puroRegisterTitle: '创建账户', puroRegisterSub: '5 分钟开始用 PURO AI', confirmPasswordLabel: '确认密码', + narrative: { + common: { + statusLive: 'live', + }, + login: { + kicker: '// 你的订阅,已经付过钱了', + headlineN: 'N', + headlineOne: '1', + headlineSep: '个订阅 →', + headlineSuffix: '个 key', + sub1: '省去切换账号的繁琐,', + sub2: '省去为多个高昂订阅重复买单。', + tagline: 'PURO(纯粹)—— 让 AI 调用回归本质。', + }, + register: { + kicker: '// 5 分钟开始用', + headlineN: 'N', + headlineOne: '1', + headlineSep: '个订阅 →', + headlineSuffix: '个 key', + sub1: '省去切换账号的繁琐,', + sub2: '省去为多个高昂订阅重复买单。', + tagline: 'PURO(纯粹)—— 让 AI 调用回归本质。', + stepsTitle: '// 下一步', + step1Title: '创建账户', + step1Desc: '邮箱 + 密码,或用 LinuxDO OAuth', + step2Title: '绑定订阅', + step2Desc: 'OAuth 接入你现有的 Claude Pro / ChatGPT Plus', + step3Title: '生成 key', + step3Desc: '拿到 sk-puro-…,换掉 SDK 的 base_url', + }, + }, }, // Dashboard @@ -5873,4 +5905,61 @@ export default { }, }, + docs: { + nav: { + products: '产品', + pricing: '定价', + docs: '文档', + login: '登录', + signup: '注册', + }, + hero: { + title: '快速接入 PURO AI', + subtitle: '三步走:拿 key → 配 base_url → 发请求', + }, + sections: { + getKey: { + heading: '1. 获取 API key', + desc: '当前 PURO AI 不开放自助注册付费。联系管理员获取:', + note: '未来通过 iShare 入口开放订阅购买。', + }, + codex: { + heading: '2. Codex CLI 接入', + configIntro: '修改 ~/.codex/config.toml:', + authIntro: '然后 ~/.codex/auth.json:', + verifyIntro: '验证:', + copy: '复制', + copied: '已复制', + }, + claudeCode: { + heading: '3. Claude Code 接入', + configIntro: '修改 ~/.claude/settings.json:', + note: 'Claude Code 通过 /v1/messages endpoint 调用 Anthropic 兼容 API。', + copy: '复制', + copied: '已复制', + }, + curl: { + heading: '4. curl 直连测试', + openaiIntro: 'OpenAI Responses API:', + anthropicIntro: 'Anthropic Messages API:', + copy: '复制', + copied: '已复制', + }, + models: { + heading: '5. 支持的模型', + colModel: '模型', + colPlatform: '平台 / 来源', + colContext: '上下文', + colStatus: '状态', + codexDedicated: 'OpenAI Codex 专用', + note: '后端 pricing 表实时跟进 model-price-repo,完整清单登录后在控制台查看。', + noteConsole: '控制台', + }, + feedback: { + heading: '6. 问题反馈', + desc: '遇到问题或希望补接某个平台:', + }, + }, + }, + } diff --git a/frontend/src/views/auth/LoginView.vue b/frontend/src/views/auth/LoginView.vue index 4f876e03..d38681a3 100644 --- a/frontend/src/views/auth/LoginView.vue +++ b/frontend/src/views/auth/LoginView.vue @@ -11,15 +11,17 @@
- 省去切换账号的繁琐,
- 省去为多个高昂订阅重复买单。
- PURO(纯粹)—— 让 AI 调用回归本质。
+ {{ t('auth.narrative.login.sub1') }}
+ {{ t('auth.narrative.login.sub2') }}
+ {{ t('auth.narrative.login.tagline') }}
- 省去切换账号的繁琐,
- 省去为多个高昂订阅重复买单。
- PURO(纯粹)—— 让 AI 调用回归本质。
+ {{ t('auth.narrative.register.sub1') }}
+ {{ t('auth.narrative.register.sub2') }}
+ {{ t('auth.narrative.register.tagline') }}
三步走:拿 key → 配 base_url → 发请求
+{{ $t('docs.hero.subtitle') }}
当前 PURO AI 不开放自助注册付费。联系管理员获取:
+{{ $t('docs.sections.getKey.desc') }}
-未来通过 iShare 入口开放订阅购买。
+{{ $t('docs.sections.getKey.note') }}
修改 ~/.codex/config.toml:
{{ $t('docs.sections.codex.configIntro') }}
model_provider = "OpenAI"
@@ -67,7 +67,7 @@ base_url = "https://ai.puro.im"
wire_api = "responses"
requires_openai_auth = true
然后 ~/.codex/auth.json:
{{ $t('docs.sections.codex.authIntro') }}
{
"OPENAI_API_KEY": "sk-xxxxxxxxxxxxxxxx"
}
验证:
+{{ $t('docs.sections.codex.verifyIntro') }}
$ codex exec --sandbox read-only "say hi"
@@ -110,8 +110,8 @@ requires_openai_auth = true
修改 ~/.claude/settings.json:
{{ $t('docs.sections.claudeCode.configIntro') }}
{
@@ -133,12 +133,12 @@ requires_openai_auth = true
"api_key": "sk-xxxxxxxxxxxxxxxx"
}
Claude Code 通过 /v1/messages endpoint 调用 Anthropic 兼容 API。
{{ $t('docs.sections.claudeCode.note') }}
OpenAI Responses API:
+{{ $t('docs.sections.curl.openaiIntro') }}
$ curl https://ai.puro.im/responses \
@@ -160,7 +160,7 @@ requires_openai_auth = true
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.4","input":"hello"}'
Anthropic Messages API:
+{{ $t('docs.sections.curl.anthropicIntro') }}
$ curl https://ai.puro.im/v1/messages \
@@ -186,15 +186,15 @@ requires_openai_auth = true
| 模型 | -平台 / 来源 | -上下文 | -状态 | +{{ $t('docs.sections.models.colModel') }} | +{{ $t('docs.sections.models.colPlatform') }} | +{{ $t('docs.sections.models.colContext') }} | +{{ $t('docs.sections.models.colStatus') }} |
|---|---|---|---|---|---|---|---|
gpt-5.4-codex |
- OpenAI Codex 专用 | +{{ $t('docs.sections.models.codexDedicated') }} | 272K | OK |
后端 pricing 表实时跟进 model-price-repo,完整清单登录后在
{{ $t('docs.sections.models.note') }}
遇到问题或希望补接某个平台:
+{{ $t('docs.sections.feedback.desc') }}
@@ -252,8 +252,11 @@ requires_openai_auth = true