dsql-admin/dsql-app/.local_dist/server/pages/send-password-reset-link.js

1 line
10 KiB
JavaScript
Raw Normal View History

2025-01-14 06:19:19 +00:00
"use strict";(()=>{var e={};e.id=6827,e.ids=[3220,6827],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},90678:(e,t,r)=>{r.r(t),r.d(t,{config:()=>b,default:()=>v,getServerSideProps:()=>w,getStaticPaths:()=>A,getStaticProps:()=>E,reportWebVitals:()=>N,routeModule:()=>C,unstable_getServerProps:()=>I,unstable_getServerSideProps:()=>q,unstable_getStaticParams:()=>O,unstable_getStaticPaths:()=>D,unstable_getStaticProps:()=>k});var s={};r.r(s),r.d(s,{SendPassResetContext:()=>S,default:()=>y,getServerSideProps:()=>P});var a=r(63865),n=r(9455),i=r(30671),o=r(5583),c=r(19796),l=r(8732),u=r(82015),d=r.n(u),p=r(1013),m=r(91258),h=r(16757),f=r(92702),g=r(46169),x=r(90048);let _=(0,r(82544).A)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);function j({message:e}){return(0,l.jsxs)("div",{className:"info gray",children:[(0,l.jsx)(_,{}),(0,l.jsx)("span",{className:"font-normal",children:e})]})}let S=d().createContext({});function y(e){let t="Cloudbased SQL data management system | Datasquirel",r="Datasquirel is a fast and efficient cloud-based SQL data management system that takes away the entire hassle of dealing with data both locally and across different platforms.",s=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:t}),(0,l.jsx)("meta",{name:"description",content:r}),(0,l.jsx)(m.A,{pageTitle:t,pageDescription:r,pagePathname:"/"})]}),[a,n]=d().useState(!1),[i,o]=d().useState(!1);return(0,l.jsx)(p.A,{head:s,user:e.user,children:(0,l.jsx)(S.Provider,{value:{user:e.user},children:(0,l.jsx)("main",{children:(0,l.jsxs)("section",{children:[a&&(0,l.jsx)(h.A,{}),i?(0,l.jsx)(x.A,{message:"Email Sent. Please check your email address and follow the link provided",className:"whitespace-nowrap"}):(0,l.jsx)("div",{className:"paper",children:(0,l.jsxs)("div",{className:"max-w-xl flex-col items-stretch",children:[(0,l.jsx)("h1",{className:"m-0 text-4xl",children:"Send Password Reset Link"}),(0,l.jsx)("span",{children:"Please enter your email address to receive a password reset link"}),(0,l.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-4",onSubmit:e=>{n(!0),e.preventDefault();let t=e.target["email-address"].value;(0,g.A)(`/api/sendPasswordResetLink?email=${t}`).then(e=>{console.log(e),setTimeout(()=>{n(!1)},500),e.success&&o(!0)})},children:[(0,l.jsx)("input",{type:"text",autoComplete:"email",name:"email-address",id:"email-address",className:"w-full",placeholder:"Email Address",defaultValue:e?.user?.logged_in_status?e.user.email:"",required:!0}),(0,l.jsx)("button",{children:"Send password reset Email"}),(0,l.jsx)(j,{message:"Please note that this link will expire after 1 hour"})]})]})})]})})})})}async function P({req:e,res:t}){let r=await (0,f.A)(e,t);return r?.social_login?{redirect:{destination:"/",permanent:!1}}:{props:{user:r}}}let v=(0,i.M)(s,"default"),E=(0,i.M)(s,"getStaticProps"),A=(0,i.M)(s,"getStaticPaths"),w=(0,i.M)(s,"getServerSideProps"),b=(0,i.M)(s,"config"),N=(0,i.M)(s,"reportWebVitals"),k=(0,i.M)(s,"unstable_getStaticProps"),D=(0,i.M)(s,"unstable_getStaticPaths"),O=(0,i.M)(s,"unstable_getStaticParams"),I=(0,i.M)(s,"unstable_getServerProps"),q=(0,i.M)(s,"unstable_getServerSideProps"),C=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/send-password-reset-link",pathname:"/send-password-reset-link",bundlePath:"",filename:""},components:{App:c.default,Document:o.default},userland:s})},90048:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(8732);function a({message:e,className:t}){return(0,s.jsxs)("div",{className:"info green"+(t?" "+t:""),children:[(0,s.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,s.jsx)("span",{children:e})]})}r(82015)},91258:(e,t,r)=>{r.d(t,{A:()=>i});var s=r(8732),a=r(82015),n=r.n(a);function i({pageTitle:e,pageDescription:t,pagePathname:r,aceEditor:a}){return(0,s.jsxs)(n().Fra