7456.68fedac1385ac3ce35e0.js 1.7 KB

12
  1. "use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[7456],{79355:(e,i,r)=>{r.r(i),r.d(i,{VerifyEmailPage:()=>v,default:()=>j});var a,n,s,l,t=r(68404),d=r(85040),o=r(90923),c=r(69783),u=r(78837),h=r(58257),m=r(45916);const p=()=>{const e=(0,h.iG)(),[i,r]=(0,t.useState)(!1);return i?(0,m.jsxs)("div",{children:[a||(a=(0,m.jsx)("p",{children:"An email with a verification link has been sent to the email address. You should receive it shortly."})),n||(n=(0,m.jsx)(c.Container,{margin:"md"})),(0,m.jsx)(c.LinkButton,{variant:"primary",href:(0,u.iE)().appSubUrl+"/signup",children:"Complete Signup"})]}):(0,m.jsx)(c.Form,{onSubmit:i=>{(0,o.getBackendSrv)().post("/api/user/signup",i).then((()=>{r(!0)})).catch((i=>{var r;const a=(null===(r=i.data)||void 0===r?void 0:r.message)||i;e.warning(a)}))},children:e=>{var i;let{register:r,errors:a}=e;return(0,m.jsxs)(m.Fragment,{children:[s||(s=(0,m.jsx)(c.Legend,{children:"Verify Email"})),(0,m.jsx)(c.Field,{label:"Email",description:"Enter your email address to get a verification link sent to you",invalid:!!a.email,error:null===(i=a.email)||void 0===i?void 0:i.message,children:(0,m.jsx)(c.Input,Object.assign({id:"email"},r("email",{required:"Email is required",pattern:{value:/^\S+@\S+$/,message:"Email is invalid"}}),{placeholder:"Email"}))}),(0,m.jsxs)(c.HorizontalGroup,{children:[l||(l=(0,m.jsx)(c.Button,{type:"submit",children:"Send verification email"})),(0,m.jsx)(c.LinkButton,{fill:"text",href:(0,u.iE)().appSubUrl+"/login",children:"Back to login"})]})]})}})};var g;const v=()=>g||(g=(0,m.jsx)(d.dd,{children:(0,m.jsx)(d.$s,{children:(0,m.jsx)(p,{})})})),j=v}}]);
  2. //# sourceMappingURL=7456.68fedac1385ac3ce35e0.js.map