ConfigExporter 模型下拉改为可搜索的自定义 combobox, 新增 config.searchModel / config.noModelMatch i18n 键。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 lines
9.9 KiB
JavaScript
2 lines
9.9 KiB
JavaScript
import{u,a as j,r as x,f as p,l as y,j as e,L as a}from"./index-EC_zKUeV.js";import{C as c}from"./CountUp-FAZKmwKP.js";import{F as o}from"./FadeContent-BdYn_6g-.js";import{S as N}from"./ShinyText--nigmw_p.js";import{B as f,S as v}from"./StarBorder-PG1oPziw.js";import{S as d}from"./SpotlightCard-CLwtgnEt.js";import{u as w}from"./useTranslation-DATAnSaR.js";import"./proxy-CLxAIQiL.js";import"./use-animation-frame-DEW1zdg1.js";function B(){const{t:s}=w(),{user:i}=u(),{site:n}=j(),[h,g]=x.useState([]),[m,b]=x.useState([]);x.useEffect(()=>{p().then(t=>{t.data.success&&g(t.data.data||[])}).catch(()=>{}),y().then(t=>{t.data.success&&b(t.data.data||[])}).catch(()=>{})},[]);const r=h.filter(t=>t.enabled!==!1);return e.jsxs("div",{className:"bg-white",children:[e.jsxs("section",{className:"max-w-6xl mx-auto px-6 pt-20 pb-16",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-blue-50 text-blue-600 text-sm font-medium mb-8",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-blue-500 animate-pulse"}),e.jsx(N,{text:s("home.lightningFast"),speed:4,color:"#2563eb",shineColor:"rgba(59,130,246,0.3)",className:"text-sm font-medium"})]}),e.jsx("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 leading-tight tracking-tight mb-6",children:e.jsx(f,{text:(n==null?void 0:n.name)||s("home.defaultHeroTitle"),delay:60,animateBy:"words",className:"text-gray-900"})}),e.jsx("p",{className:"text-lg text-gray-500 max-w-xl mx-auto mb-10 leading-relaxed",children:s("home.heroSubtitle")}),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:"#3b82f6",speed:"5s",className:"!rounded-xl !px-7 !py-3 text-sm font-medium text-blue-700",children:[s("home.goToDashboard")," →"]})}):e.jsxs(e.Fragment,{children:[e.jsxs(a,{to:"/register",className:"px-7 py-3 rounded-xl bg-blue-600 text-white font-medium text-sm hover:bg-blue-700 transition-colors shadow-sm",children:[s("home.getStarted")," →"]}),e.jsx(a,{to:"/pricing",className:"px-7 py-3 rounded-xl border border-gray-200 text-gray-600 font-medium text-sm hover:border-gray-300 hover:bg-gray-50 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-8 max-w-lg mx-auto mt-16 pt-10 border-t border-gray-100",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-gray-900",children:[e.jsx(c,{from:0,to:r.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:s("home.aiModels")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-gray-900",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:s("home.uptime")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-gray-900",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:s("home.latency")})]})]})})]}),e.jsx("section",{className:"bg-gray-50/70 border-y border-gray-100",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-gray-900 mb-3",children:s("home.whyChooseUs")}),e.jsx("p",{className:"text-gray-500",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-gray-100",spotlightColor:"rgba(59,130,246,0.08)",children:e.jsxs("div",{className:"p-7",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-50 flex items-center justify-center mb-5",children:e.jsx("svg",{className:"w-6 h-6 text-blue-600",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-gray-900 mb-2",children:s("home.lightningFast")}),e.jsx("p",{className:"text-sm text-gray-500 leading-relaxed",children:s("home.lightningFastDesc")})]})}),e.jsx(d,{className:"!bg-white !rounded-2xl !p-0 !border-gray-100",spotlightColor:"rgba(99,102,241,0.08)",children:e.jsxs("div",{className:"p-7",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-indigo-50 flex items-center justify-center mb-5",children:e.jsx("svg",{className:"w-6 h-6 text-indigo-600",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-gray-900 mb-2",children:s("home.securePrivate")}),e.jsx("p",{className:"text-sm text-gray-500 leading-relaxed",children:s("home.securePrivateDesc")})]})}),e.jsx(d,{className:"!bg-white !rounded-2xl !p-0 !border-gray-100",spotlightColor:"rgba(16,185,129,0.08)",children:e.jsxs("div",{className:"p-7",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-emerald-50 flex items-center justify-center mb-5",children:e.jsx("svg",{className:"w-6 h-6 text-emerald-600",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-gray-900 mb-2",children:s("home.payAsYouGo")}),e.jsx("p",{className:"text-sm text-gray-500 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-gray-900 mb-3",children:s("home.availableModels")}),e.jsx("p",{className:"text-gray-500",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-gray-100 bg-gray-50/50 flex items-center gap-3 hover:bg-blue-50/50 hover:border-blue-100 transition-colors group",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 flex-shrink-0"}),e.jsx("span",{className:"text-sm font-mono text-gray-600 group-hover:text-blue-700 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-blue-600 hover:text-blue-700 transition-colors font-medium",children:[s("home.viewAllModels",{count:r.length})," →"]})})]})}),m.length>0&&e.jsx("section",{className:"bg-gray-50/70 border-y border-gray-100",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-gray-900 mb-3",children:s("home.plansPackages")}),e.jsx("p",{className:"text-gray-500",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-blue-200 !shadow-md !shadow-blue-50":"!border-gray-100"}`,spotlightColor:l===1?"rgba(59,130,246,0.1)":"rgba(0,0,0,0.03)",children:e.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[l===1&&e.jsx("span",{className:"text-xs text-blue-600 font-semibold uppercase tracking-wider mb-2",children:"Popular"}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-1",children:t.name}),t.description&&e.jsx("p",{className:"text-sm text-gray-500 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-gray-900",children:["$",t.price]}),t.original_price>t.price&&e.jsxs("span",{className:"text-sm text-gray-500 line-through",children:["$",t.original_price]})]}),t.duration>0&&e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:s("home.days",{count:t.duration})})]}),e.jsx(a,{to:i?"/packages":"/register",className:`mt-4 py-2.5 rounded-xl font-medium text-sm text-center transition-colors ${l===1?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,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-blue-600 to-indigo-700 rounded-3xl p-12 text-center",children:[e.jsx("h2",{className:"text-3xl font-bold text-white mb-4",children:s("home.readyToStart")}),e.jsx("p",{className:"text-blue-100 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-xl bg-white text-blue-700 font-semibold text-sm hover:bg-blue-50 transition-colors",children:s("home.goToDashboard")}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"px-8 py-3 rounded-xl bg-white text-blue-700 font-semibold text-sm hover:bg-blue-50 transition-colors",children:s("home.createFreeAccount")}),e.jsx(a,{to:"/login",className:"px-8 py-3 rounded-xl border border-white/30 text-white font-medium text-sm hover:bg-white/10 transition-colors",children:s("home.signIn")})]})})]})})})]})}export{B as default};
|