dsql-admin/dsql-app/.local_dist/static/chunks/pages/send-password-reset-link-40c349141dc68707.js
Benjamin Toby a7dfd48284 Updates
2024-12-09 10:39:09 +01:00

1 line
2.8 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6827],{4652:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/send-password-reset-link",function(){return a(5344)}])},385:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});var t=a(4848);function l(e){let{message:s,className:a}=e;return(0,t.jsxs)("div",{className:"info green"+(a?" "+a:""),children:[(0,t.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,t.jsx)("span",{children:s})]})}a(6540)},5344:(e,s,a)=>{"use strict";a.r(s),a.d(s,{SendPassResetContext:()=>h,__N_SSP:()=>u,default:()=>x});var t=a(4848),l=a(6540),n=a(3444),i=a(6411),r=a(620),d=a(3698),c=a(385);let o=(0,a(5737).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 m(e){let{message:s}=e;return(0,t.jsxs)("div",{className:"info gray",children:[(0,t.jsx)(o,{}),(0,t.jsx)("span",{className:"font-normal",children:s})]})}var u=!0;let h=l.createContext({});function x(e){var s;let a="Cloudbased SQL data management system | Datasquirel",o="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.",u=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:a}),(0,t.jsx)("meta",{name:"description",content:o}),(0,t.jsx)(i.A,{pageTitle:a,pageDescription:o,pagePathname:"/"})]}),[x,p]=l.useState(!1),[f,j]=l.useState(!1);return(0,t.jsx)(n.A,{head:u,user:e.user,children:(0,t.jsx)(h.Provider,{value:{user:e.user},children:(0,t.jsx)("main",{children:(0,t.jsxs)("section",{children:[x&&(0,t.jsx)(r.A,{}),f?(0,t.jsx)(c.A,{message:"Email Sent. Please check your email address and follow the link provided",className:"whitespace-nowrap"}):(0,t.jsx)("div",{className:"paper",children:(0,t.jsxs)("div",{className:"max-w-xl flex-col items-stretch",children:[(0,t.jsx)("h1",{className:"m-0 text-4xl",children:"Send Password Reset Link"}),(0,t.jsx)("span",{children:"Please enter your email address to receive a password reset link"}),(0,t.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-4",onSubmit:e=>{p(!0),e.preventDefault();let s=e.target["email-address"].value;(0,d.A)("/api/sendPasswordResetLink?email=".concat(s)).then(e=>{console.log(e),setTimeout(()=>{p(!1)},500),e.success&&j(!0)})},children:[(0,t.jsx)("input",{type:"text",autoComplete:"email",name:"email-address",id:"email-address",className:"w-full",placeholder:"Email Address",defaultValue:(null==e?void 0:null===(s=e.user)||void 0===s?void 0:s.logged_in_status)?e.user.email:"",required:!0}),(0,t.jsx)("button",{children:"Send password reset Email"}),(0,t.jsx)(m,{message:"Please note that this link will expire after 1 hour"})]})]})})]})})})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[636,6593,8792],()=>s(4652)),_N_E=e.O()}]);