1 line
3.3 KiB
JavaScript
1 line
3.3 KiB
JavaScript
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,23750,e=>{"use strict";var t=e.i(43476),s=e.i(47163);function a({className:e,type:a,...r}){return(0,t.jsx)("input",{type:a,"data-slot":"input",className:(0,s.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}e.s(["Input",()=>a])},70756,e=>{"use strict";let t=(0,e.i(75254).default)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",()=>t],70756)},7156,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(18566),r=e.i(70756),i=e.i(84614),l=e.i(67881),n=e.i(23750),d=e.i(4421);function c(){let e=(0,a.useRouter)(),{adminLogin:c}=(0,d.useStore)(),[o,x]=(0,s.useState)(""),[u,m]=(0,s.useState)(""),[h,b]=(0,s.useState)(""),p=()=>{b(""),c(o,u)?e.push("/admin"):b("用户名或密码错误")};return(0,t.jsx)("div",{className:"min-h-screen bg-[#0a1628] text-white flex items-center justify-center p-4",children:(0,t.jsxs)("div",{className:"w-full max-w-md",children:[(0,t.jsxs)("div",{className:"text-center mb-8",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-white mb-2",children:"管理后台"}),(0,t.jsx)("p",{className:"text-gray-500",children:"一场SOUL的创业实验场"})]}),(0,t.jsxs)("div",{className:"bg-[#0f2137] rounded-2xl p-8 border border-gray-700/50",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-white mb-6 text-center",children:"管理员登录"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-gray-400 text-sm mb-2",children:"用户名"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(i.User,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-500"}),(0,t.jsx)(n.Input,{type:"text",value:o,onChange:e=>x(e.target.value),placeholder:"请输入用户名",className:"pl-10 bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-gray-400 text-sm mb-2",children:"密码"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(r.Lock,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-500"}),(0,t.jsx)(n.Input,{type:"password",value:u,onChange:e=>m(e.target.value),placeholder:"请输入密码",className:"pl-10 bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500",onKeyDown:e=>"Enter"===e.key&&p()})]})]}),h&&(0,t.jsx)("p",{className:"text-red-400 text-sm",children:h}),(0,t.jsx)(l.Button,{onClick:p,className:"w-full bg-[#38bdac] hover:bg-[#2da396] text-white py-5",children:"登录"})]}),(0,t.jsx)("p",{className:"text-gray-500 text-xs text-center mt-6",children:"默认账号: admin / key123456"})]})]})})}e.s(["default",()=>c])}]); |