- 后端: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>
2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
import{u as g,a as p,r as c,f as j,l as D,j as e,L as a}from"./index-DXlTUvPt.js";import{C as x}from"./CountUp-CHKpQlGY.js";import{F as o}from"./FadeContent-MRqWM3OI.js";import{G as N}from"./GradientText-DSdkmn9e.js";import{B as f,S as v}from"./StarBorder-Cka8h-eQ.js";import{S as w}from"./ShinyText-m1KeHu-_.js";import{S as d}from"./SpotlightCard-CaBd4ccW.js";import{u as F}from"./useTranslation-nOWDYxQJ.js";import"./use-animation-frame-BXc_7J_g.js";import"./proxy-ZBtashAi.js";function T(){const{t:s}=F(),{user:i}=g(),{site:n}=p(),[h,b]=c.useState([]),[m,u]=c.useState([]);c.useEffect(()=>{j().then(t=>{t.data.success&&b(t.data.data||[])}).catch(()=>{}),D().then(t=>{t.data.success&&u(t.data.data||[])}).catch(()=>{})},[]);const r=h.filter(t=>t.enabled!==!1);return e.jsxs("div",{className:"bg-[#FAF6F1]",children:[e.jsxs("section",{className:"relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-[#F5EEE6] via-[#FAF6F1] to-[#FAF6F1]"}),e.jsx("div",{className:"absolute top-0 right-0 w-[600px] h-[600px] bg-[radial-gradient(circle_at_70%_30%,rgba(217,119,87,0.08),transparent_70%)]"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-[400px] h-[400px] bg-[radial-gradient(circle_at_30%_70%,rgba(196,97,63,0.05),transparent_60%)]"}),e.jsxs("div",{className:"relative max-w-6xl mx-auto px-6 pt-24 pb-20",children:[e.jsx(o,{blur:!0,duration:600,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-[#D97757]/8 border border-[#D97757]/15 mb-8",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#D97757] animate-pulse"}),e.jsx(w,{text:s("home.lightningFast"),speed:4,color:"#D97757",shineColor:"rgba(217,119,87,0.4)",className:"text-sm font-medium"})]}),e.jsx("h1",{className:"text-4xl md:text-6xl font-bold leading-tight tracking-tight mb-6",children:e.jsx(N,{colors:["#D97757","#C4613F","#A85232","#C4613F","#D97757"],animationSpeed:6,className:"text-4xl md:text-6xl font-bold leading-tight tracking-tight",children:(n==null?void 0:n.name)||s("home.defaultHeroTitle")})}),e.jsx("div",{className:"mb-10",children:e.jsx(f,{text:s("home.heroSubtitle"),className:"text-lg text-[#6B5D4F] max-w-xl mx-auto leading-relaxed",delay:50,animateBy:"words"})}),e.jsx("div",{className:"flex items-center justify-center gap-3",children:i?e.jsx(a,{to:"/dashboard",children:e.jsxs(v,{as:"div",color:"#D97757",speed:"6s",className:"!rounded-full !px-8 !py-3 text-sm font-medium text-[#D97757]",children:[s("home.goToDashboard")," →"]})}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-8 py-3 rounded-full bg-[#D97757] text-white font-medium text-sm hover:bg-[#C4613F] transition-colors shadow-sm shadow-[#D97757]/20",children:[s("home.getStarted")," →"]}),e.jsx(a,{to:"/pricing",className:"px-8 py-3 rounded-full border border-[#D9C5B2] text-[#6B5D4F] font-medium text-sm hover:border-[#D97757]/30 hover:bg-[#D97757]/5 transition-colors",children:s("home.viewPricing")})]})})]})}),e.jsx(o,{blur:!0,duration:600,delay:300,children:e.jsxs("div",{className:"grid grid-cols-3 gap-6 max-w-lg mx-auto mt-20",children:[e.jsxs("div",{className:"text-center p-5 rounded-2xl bg-white/60 border border-[#E8DDD0] backdrop-blur-sm",children:[e.jsxs("div",{className:"text-3xl font-bold text-[#3D3024]",children:[e.jsx(x,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-1",children:s("home.aiModels")})]}),e.jsxs("div",{className:"text-center p-5 rounded-2xl bg-white/60 border border-[#E8DDD0] backdrop-blur-sm",children:[e.jsxs("div",{className:"text-3xl font-bold text-[#3D3024]",children:[e.jsx(x,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-1",children:s("home.uptime")})]}),e.jsxs("div",{className:"text-center p-5 rounded-2xl bg-white/60 border border-[#E8DDD0] backdrop-blur-sm",children:[e.jsxs("div",{className:"text-3xl font-bold text-[#3D3024]",children:["<",e.jsx(x,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-[#8B7D6E] mt-1",children:s("home.latency")})]})]})})]})]}),e.jsx("section",{className:"bg-[#F5EEE6] border-y border-[#E8DDD0]",children:e.jsx("div",{className:"max-w-6xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:600,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-3xl font-bold text-[#3D3024] mb-3",children:s("home.whyChooseUs")}),e.jsx("p",{className:"text-[#6B5D4F]",children:s("home.whyChooseUsDesc")})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[e.jsx(d,{className:"!bg-white !rounded-2xl !p-0 !border-[#E8DDD0]",spotlightColor:"rgba(217,119,87,0.08)",children:e.jsxs("div",{className:"p-7",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#D97757]/10 flex items-center justify-center mb-5",children:e.jsx("svg",{className:"w-6 h-6 text-[#D97757]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),e.jsx("h3",{className:"text-base font-semibold text-[#3D3024] mb-2",children:s("home.lightningFast")}),e.jsx("p",{className:"text-sm text-[#6B5D4F] leading-relaxed",children:s("home.lightningFastDesc")})]})}),e.jsx(d,{className:"!bg-white !rounded-2xl !p-0 !border-[#E8DDD0]",spotlightColor:"rgba(168,82,50,0.06)",children:e.jsxs("div",{className:"p-7",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#A85232]/10 flex items-center justify-center mb-5",children:e.jsx("svg",{className:"w-6 h-6 text-[#A85232]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}),e.jsx("h3",{className:"text-base font-semibold text-[#3D3024] mb-2",children:s("home.securePrivate")}),e.jsx("p",{className:"text-sm text-[#6B5D4F] leading-relaxed",children:s("home.securePrivateDesc")})]})}),e.jsx(d,{className:"!bg-white !rounded-2xl !p-0 !border-[#E8DDD0]",spotlightColor:"rgba(196,97,63,0.06)",children:e.jsxs("div",{className:"p-7",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#C4613F]/10 flex items-center justify-center mb-5",children:e.jsx("svg",{className:"w-6 h-6 text-[#C4613F]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),e.jsx("h3",{className:"text-base font-semibold text-[#3D3024] mb-2",children:s("home.payAsYouGo")}),e.jsx("p",{className:"text-sm text-[#6B5D4F] leading-relaxed",children:s("home.payAsYouGoDesc")})]})})]})]})})}),r.length>0&&e.jsx("section",{className:"max-w-6xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:600,delay:100,children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl font-bold text-[#3D3024] mb-3",children:s("home.availableModels")}),e.jsx("p",{className:"text-[#6B5D4F]",children:s("home.availableModelsDesc",{count:r.length})})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:r.slice(0,12).map((t,l)=>e.jsxs("div",{className:"px-4 py-3 rounded-xl border border-[#E8DDD0] bg-white/60 flex items-center gap-3 hover:bg-[#D97757]/5 hover:border-[#D97757]/20 transition-colors group backdrop-blur-sm",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-[#D97757] flex-shrink-0"}),e.jsx("span",{className:"text-sm font-mono text-[#6B5D4F] group-hover:text-[#D97757] transition-colors truncate",children:t.display_name||t.model_name})]},t.id||l))}),r.length>12&&e.jsx("div",{className:"text-center mt-6",children:e.jsxs(a,{to:"/pricing",className:"text-sm text-[#D97757] hover:text-[#C4613F] transition-colors font-medium",children:[s("home.viewAllModels",{count:r.length})," →"]})})]})}),m.length>0&&e.jsx("section",{className:"bg-[#F5EEE6] border-y border-[#E8DDD0]",children:e.jsx("div",{className:"max-w-6xl mx-auto px-6 py-20",children:e.jsxs(o,{blur:!0,duration:600,delay:100,children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl font-bold text-[#3D3024] mb-3",children:s("home.plansPackages")}),e.jsx("p",{className:"text-[#6B5D4F]",children:s("home.choosePlan")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl mx-auto",children:m.filter(t=>t.enabled).slice(0,3).map((t,l)=>e.jsx(d,{className:`!bg-white !rounded-2xl !p-0 !flex !flex-col ${l===1?"!border-[#D97757] !shadow-md !shadow-[#D97757]/10":"!border-[#E8DDD0]"}`,spotlightColor:l===1?"rgba(217,119,87,0.1)":"rgba(217,119,87,0.04)",children:e.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[l===1&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-[#D97757] font-semibold uppercase tracking-wider mb-2",children:[e.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})}),"Popular"]}),e.jsx("h3",{className:"text-lg font-semibold text-[#3D3024] mb-1",children:t.name}),t.description&&e.jsx("p",{className:"text-sm text-[#6B5D4F] mb-4",children:t.description}),e.jsxs("div",{className:"mt-auto pt-4",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsxs("span",{className:"text-3xl font-bold text-[#3D3024]",children:["$",t.price]}),t.original_price>t.price&&e.jsxs("span",{className:"text-sm text-[#8B7D6E] line-through",children:["$",t.original_price]})]}),t.duration>0&&e.jsx("p",{className:"text-xs text-[#8B7D6E] mt-1",children:s("home.days",{count:t.duration})})]}),e.jsx(a,{to:i?"/packages":"/register",className:`mt-4 py-2.5 rounded-full font-medium text-sm text-center transition-colors ${l===1?"bg-[#D97757] text-white hover:bg-[#C4613F]":"bg-[#F5EEE6] text-[#6B5D4F] hover:bg-[#E8DDD0]"}`,children:s(i?"home.subscribe":"home.getStarted")})]})},t.id))})]})})}),e.jsx("section",{className:"max-w-6xl mx-auto px-6 py-24",children:e.jsx(o,{blur:!0,duration:600,delay:100,children:e.jsxs("div",{className:"bg-gradient-to-br from-[#D97757] to-[#A85232] rounded-3xl p-12 text-center relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.08),transparent_70%)]"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-48 h-48 bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.05),transparent_60%)]"}),e.jsxs("div",{className:"relative",children:[e.jsx("h2",{className:"text-3xl font-bold text-white mb-4",children:s("home.readyToStart")}),e.jsx("p",{className:"text-white/70 mb-8 max-w-md mx-auto",children:s("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:i?e.jsx(a,{to:"/dashboard",className:"px-8 py-3 rounded-full bg-white text-[#D97757] font-semibold text-sm hover:bg-[#FAF6F1] transition-colors shadow-sm",children:s("home.goToDashboard")}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-8 py-3 rounded-full bg-white text-[#D97757] font-semibold text-sm hover:bg-[#FAF6F1] transition-colors shadow-sm",children:s("home.createFreeAccount")}),e.jsx(a,{to:"/login",className:"px-8 py-3 rounded-full border border-white/30 text-white font-medium text-sm hover:bg-white/10 transition-colors",children:s("home.signIn")})]})})]})]})})})]})}export{T as default};
|