/
home
/
techb158
/
balavpn.abdallabala.com
/
.next
/
static
/
chunks
/
app
/
signup
/
/home/techb158/balavpn.abdallabala.com/.next/static/chunks/app/signup
mkdir
upload
Name
Size
Mode
Actions
page-9bc8ae1fd8d6691f.js
3136
0666
edit
dl
rm
Edit:
/home/techb158/balavpn.abdallabala.com/.next/static/chunks/app/signup/page-9bc8ae1fd8d6691f.js
(3136B)
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[879],{63:(e,t,i)=>{"use strict";var a=i(7260);i.o(a,"useRouter")&&i.d(t,{useRouter:function(){return a.useRouter}}),i.o(a,"useSearchParams")&&i.d(t,{useSearchParams:function(){return a.useSearchParams}})},774:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var a=i(5155),r=i(2115),n=i(63);function s(){let e=(0,n.useRouter)(),[t,i]=(0,r.useState)(""),[s,o]=(0,r.useState)(""),[l,d]=(0,r.useState)(""),[u,c]=(0,r.useState)(""),[h,p]=(0,r.useState)(!1);async function m(i){i.preventDefault(),c(""),p(!0);try{let i=await fetch("/api/auth/signup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t,displayName:s,password:l})});if(!i.ok){let e=await i.json();throw Error(e.error||"Signup failed")}e.push("/dashboard")}catch(e){c(e.message),p(!1)}}return(0,a.jsx)("main",{className:"shell",style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh"},children:(0,a.jsxs)("div",{className:"panel",style:{maxWidth:420,width:"100%",padding:32},children:[(0,a.jsx)("div",{className:"brand",style:{fontSize:24,marginBottom:24,textAlign:"center"},children:"COSMIC AI-Risk SaaS"}),(0,a.jsx)("h2",{style:{marginBottom:8},children:"Create account"}),(0,a.jsx)("p",{className:"muted",style:{marginBottom:24},children:"Sign up for a new workspace"}),u&&(0,a.jsx)("div",{style:{background:"var(--blocked-soft)",color:"var(--blocked)",padding:"8px 12px",borderRadius:8,marginBottom:16,fontSize:14},children:u}),(0,a.jsxs)("form",{onSubmit:m,children:[(0,a.jsxs)("div",{style:{marginBottom:16},children:[(0,a.jsx)("label",{style:{display:"block",marginBottom:4,fontSize:14,fontWeight:600},children:"Email"}),(0,a.jsx)("input",{type:"email",value:t,onChange:e=>i(e.target.value),required:!0,style:{width:"100%",padding:"10px 12px",borderRadius:8,border:"1px solid var(--line)",fontSize:16,boxSizing:"border-box"}})]}),(0,a.jsxs)("div",{style:{marginBottom:16},children:[(0,a.jsx)("label",{style:{display:"block",marginBottom:4,fontSize:14,fontWeight:600},children:"Display name"}),(0,a.jsx)("input",{type:"text",value:s,onChange:e=>o(e.target.value),style:{width:"100%",padding:"10px 12px",borderRadius:8,border:"1px solid var(--line)",fontSize:16,boxSizing:"border-box"}})]}),(0,a.jsxs)("div",{style:{marginBottom:24},children:[(0,a.jsx)("label",{style:{display:"block",marginBottom:4,fontSize:14,fontWeight:600},children:"Password"}),(0,a.jsx)("input",{type:"password",value:l,onChange:e=>d(e.target.value),required:!0,minLength:8,style:{width:"100%",padding:"10px 12px",borderRadius:8,border:"1px solid var(--line)",fontSize:16,boxSizing:"border-box"}})]}),(0,a.jsx)("button",{type:"submit",className:"button primary",style:{width:"100%",padding:"12px 24px",fontSize:16},disabled:h,children:h?"Creating account...":"Create account"})]}),(0,a.jsx)("p",{style:{marginTop:16,textAlign:"center",fontSize:14},children:(0,a.jsx)("a",{href:"/login",style:{color:"var(--green)"},children:"Already have an account?"})})]})})}},7880:(e,t,i)=>{Promise.resolve().then(i.bind(i,774))}},e=>{e.O(0,[8441,1255,7358],()=>e(e.s=7880)),_N_E=e.O()}]);
Save
cmd:
run