| 1 |
- import{j as e,E as x}from"./semi-ui-SYqiqOBN.js";import{r as u}from"./react-core-DtMAePju.js";import{A as E,s as f}from"./index-B2EdsORd.js";import{u as b}from"./i18n-CVqrn-QJ.js";import{m as I}from"./tools-_urh1evK.js";import{I as A,a as j}from"./IllustrationConstruction-h2fiJesH.js";import"./react-components-XvIrFW7f.js";const w=()=>{const{t:r}=b(),[t,s]=u.useState(""),[n,i]=u.useState(!1),l=new Date().getFullYear(),c=async()=>{s(localStorage.getItem("about")||"");const h=await E.get("/api/about"),{success:d,message:g,data:a}=h.data;if(d){let o=a;a.startsWith("https://")||(o=I.parse(a)),s(o),localStorage.setItem("about",o)}else f(g),s(r("加载关于内容失败..."));i(!0)};u.useEffect(()=>{c().then()},[]);const m={padding:"24px"},p=e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx("p",{children:r("可在设置页面设置关于内容,支持 HTML & Markdown")}),r("MIX API项目仓库地址:"),e.jsx("a",{href:"https://github.com/aiprodcoder/MIXAPI",target:"_blank",rel:"noopener noreferrer",className:"!text-semi-color-primary",children:"https://github.com/aiprodcoder/MIXAPI"}),e.jsxs("p",{children:[e.jsx("a",{href:"https://github.com/aiprodcoder/MIXAPI",target:"_blank",rel:"noopener noreferrer",className:"!text-semi-color-primary",children:"MIXAPI"})," ",r("© {{currentYear}}",{currentYear:l})," ",e.jsx("a",{href:"https://github.com/aiprodcoder",target:"_blank",rel:"noopener noreferrer",className:"!text-semi-color-primary",children:"AiProdCoder"})," ",r("| 基于")," ",e.jsx("a",{href:"https://github.com/songquanpeng/one-api/releases/tag/v0.5.4",target:"_blank",rel:"noopener noreferrer",className:"!text-semi-color-primary",children:"New API"})," ",e.jsx("a",{href:"https://github.com/QuantumNous/new-api",target:"_blank",rel:"noopener noreferrer",className:"!text-semi-color-primary",children:"New API"})]}),e.jsxs("p",{children:[r("本项目根据"),e.jsx("a",{href:"https://github.com/songquanpeng/one-api/blob/v0.5.4/LICENSE",target:"_blank",rel:"noopener noreferrer",className:"!text-semi-color-primary",children:r("MIT许可证")}),r("授权,需在遵守"),e.jsx("a",{href:"https://github.com/aiprodcoder/MIXAPI/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",className:"!text-semi-color-primary",children:r("Apache-2.0协议")}),r("的前提下使用。")]})]});return e.jsx("div",{className:"mt-[64px] px-2",children:n&&t===""?e.jsx("div",{className:"flex justify-center items-center h-screen p-8",children:e.jsx(x,{image:e.jsx(A,{style:{width:150,height:150}}),darkModeImage:e.jsx(j,{style:{width:150,height:150}}),description:r("管理员暂时未设置任何关于内容"),style:m,children:p})}):e.jsx(e.Fragment,{children:t.startsWith("https://")?e.jsx("iframe",{src:t,style:{width:"100%",height:"100vh",border:"none"}}):e.jsx("div",{style:{fontSize:"larger"},dangerouslySetInnerHTML:{__html:t}})})})};export{w as default};
|