12345678 |
- "use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[133],{1156:(e,r,s)=>{s.r(r),s.d(r,{SendResetMailPage:()=>x,default:()=>y});var i,a,n,t,o=s(68404),l=s(85040),d=s(36636),u=s(90923),c=s(69783),h=s(78837),m=s(45916);const p=e=>d.css`
- color: ${e.colors.formDescription};
- font-size: ${e.typography.size.sm};
- font-weight: ${e.typography.weight.regular};
- margin-top: ${e.spacing.sm};
- display: block;
- `,g=()=>{var e,r;const[s,l]=(0,o.useState)(!1),d=(0,c.useStyles)(p),g=`${h.ZP.appSubUrl}/login`;return s?(0,m.jsxs)("div",{children:[i||(i=(0,m.jsx)("p",{children:"An email with a reset link has been sent to the email address. You should receive it shortly."})),a||(a=(0,m.jsx)(c.Container,{margin:"md"})),(0,m.jsx)(c.LinkButton,{variant:"primary",href:g,children:"Back to login"})]}):(0,m.jsx)(c.Form,{onSubmit:async e=>{await(0,u.getBackendSrv)().post("/api/user/password/send-reset-email",e)&&l(!0)},children:s=>{var i;let{register:a,errors:o}=s;return(0,m.jsxs)(m.Fragment,{children:[n||(n=(0,m.jsx)(c.Legend,{children:"Reset password"})),(0,m.jsx)(c.Field,{label:"User",description:"Enter your information to get a reset link sent to you",invalid:!!o.userOrEmail,error:null==o||null===(i=o.userOrEmail)||void 0===i?void 0:i.message,children:(0,m.jsx)(c.Input,Object.assign({id:"user-input",placeholder:"Email or username"},a("userOrEmail",{required:"Email or username is required"})))}),e||(e=(0,m.jsxs)(c.HorizontalGroup,{children:[t||(t=(0,m.jsx)(c.Button,{type:"submit",children:"Send reset email"})),(0,m.jsx)(c.LinkButton,{fill:"text",href:g,children:"Back to login"})]})),r||(r=(0,m.jsx)("p",{className:d,children:"Did you forget your username or email? Contact your Grafana administrator."}))]})}})};var j;const x=()=>j||(j=(0,m.jsx)(l.dd,{children:(0,m.jsx)(l.$s,{children:(0,m.jsx)(g,{})})})),y=x}}]);
- //# sourceMappingURL=SendResetMailPage.1ecf05a4214071ada93a.js.map
|