You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

2 rivejä
4.3 KiB

  1. import{j as w,k as o,l as x,r as y,c as k,a as e,m,v as f,t as j,b as _,w as h,d as C,n as I,p as V,q as S,e as T,i,o as P,_ as B}from"./index-5dca7a6a.js";import{_ as E,a as L}from"./facebook-29b77094.js";import{g as N,p as R,s as U}from"./api-2fe5baa7.js";const u=n=>(V("data-v-e3f9fc6e"),n=n(),S(),n),A={class:"page-wrapper",id:"app","data-layout":"horizontal","data-navbarbg":"skin6","data-sidebartype":"full","data-sidebar-position":"fixed","data-header-position":"fixed"},q=C('<header class="app-header" data-v-e3f9fc6e><nav class="navbar navbar-expand-lg navbar-light container-fluid px-0" data-v-e3f9fc6e><ul class="navbar-nav" data-v-e3f9fc6e><li class="nav-item d-block d-lg-none" data-v-e3f9fc6e><a class="nav-link sidebartoggler ms-n3" id="sidebarCollapse" href="javascript:void(0)" data-v-e3f9fc6e><i class="ti ti-menu-2" data-v-e3f9fc6e></i></a></li><li class="nav-item d-none d-lg-block" data-v-e3f9fc6e><a href="index.html" class="text-nowrap nav-link" data-v-e3f9fc6e><img src="'+T+'" class="light-logo" width="180" alt="" data-v-e3f9fc6e></a></li></ul></nav></header>',1),z={class:"body-wrapper overflow-hidden"},D={class:"position-relative overflow-hidden min-vh-100 d-flex align-items-center justify-content-center drawise-auth-bg"},F={class:"d-flex align-items-center justify-content-center w-100"},M={class:"row justify-content-center w-100"},G={class:"col-md-8 col-lg-6 col-xxl-3"},H={class:"card mb-0"},O={class:"card-body"},J={class:"mb-3"},K={class:"mb-4"},Q={class:"mb-4"},W=["disabled"],X={class:"d-flex align-items-center justify-content-center"},Y=u(()=>e("p",{class:"fs-4 mb-0 fw-medium"}," Already have an account? ",-1)),Z=u(()=>e("div",{class:"position-relative text-center my-4"},[e("p",{class:"mb-0 fs-4 px-3 d-inline-block bg-white text-dark z-index-5 position-relative"}," or register with "),e("span",{class:"border-top w-100 position-absolute top-50 start-50 translate-middle"})],-1)),$=u(()=>e("div",{class:"row"},[e("div",{class:"col-6 mb-2 mb-sm-0"},[e("a",{class:"btn btn-white text-dark border fw-normal d-flex align-items-center justify-content-center rounded-2 py-8",href:"javascript:void(0)",role:"button"},[e("img",{src:E,alt:"",class:"img-fluid me-2",width:"18",height:"18"}),e("span",{class:"d-none d-sm-block me-1 flex-shrink-0"}),i("Google ")])]),e("div",{class:"col-6"},[e("a",{class:"btn btn-white text-dark border fw-normal d-flex align-items-center justify-content-center rounded-2 py-8",href:"javascript:void(0)",role:"button"},[e("img",{src:L,alt:"",class:"img-fluid me-2",width:"18",height:"18"}),e("span",{class:"d-none d-sm-block me-1 flex-shrink-0"}),i("Facebook ")])])],-1)),ee=w({__name:"signup",setup(n){const l=o(!1),d=o("Register"),c=o(),r=o(),p=o(),b=async()=>{try{l.value=!0,d.value="loading...",(await R)("/auth/signup/",{email:c.value,password:r.value,confirm_password:p.value}).then(a=>{console.log(a),a.data&&(U(a.data.token),console.log(a.data.token),I.push("dashboard"))}).catch(()=>{l.value=!1,d.value="Failed. Try Again."})}catch(a){console.error("Error making POST request:",a)}};x(()=>{g()});const g=async()=>{(await N)("/auth/test-token/").then(()=>{window.location.replace("https://app.drawise.net/dashboard")})};return(a,s)=>{const v=y("RouterLink");return P(),k("div",A,[q,e("div",z,[e("div",D,[e("div",F,[e("div",M,[e("div",G,[e("div",H,[e("div",O,[e("div",null,[e("div",J,[m(e("input",{"onUpdate:modelValue":s[0]||(s[0]=t=>c.value=t),type:"email",class:"form-control",id:"exampleInputEmail1","aria-describedby":"emailHelp",placeholder:"Email"},null,512),[[f,c.value]])]),e("div",K,[m(e("input",{"onUpdate:modelValue":s[1]||(s[1]=t=>r.value=t),type:"password",class:"form-control",id:"exampleInputPassword1",placeholder:"Password"},null,512),[[f,r.value]])]),e("div",Q,[m(e("input",{"onUpdate:modelValue":s[2]||(s[2]=t=>p.value=t),type:"password",class:"form-control",id:"exampleInputPassword1",placeholder:"Confirm Password"},null,512),[[f,p.value]])]),e("button",{onClick:b,class:"btn btn-success w-100 py-8 mb-4 rounded-2",disabled:l.value},j(d.value),9,W),_(v,{to:"/terms",type:"button",class:"text-center d-block w-100 waves-effect"},{default:h(()=>[i(" Terms & privacy ")]),_:1}),e("div",X,[Y,_(v,{to:{name:"login"},class:"text-primary fw-medium ms-2"},{default:h(()=>[i("Login")]),_:1})])]),Z,$])])])])])])])])}}});const oe=B(ee,[["__scopeId","data-v-e3f9fc6e"]]);export{oe as default};