7456.68fedac1385ac3ce35e0.js.map 4.1 KB

1
  1. {"version":3,"file":"7456.68fedac1385ac3ce35e0.js","mappings":"gPAWO,MAAMA,EAAkB,KAC7B,MAAMC,GAAYC,EAAAA,EAAAA,OACXC,EAAWC,IAAgBC,EAAAA,EAAAA,WAAS,GAc3C,OAAIF,GAEA,kCACE,iIADF,OAEE,SAAC,EAAAG,UAAD,CAAWC,OAAO,SAClB,SAAC,EAAAC,WAAD,CAAYC,QAAQ,UAAUC,MAAMC,EAAAA,EAAAA,MAAYC,UAAY,UAA5D,iCAQJ,SAAC,EAAAC,KAAD,CAAMC,SAzBUC,KAChBC,EAAAA,EAAAA,iBACGC,KAAK,mBAAoBF,GACzBG,MAAK,KACJd,GAAa,MAEde,OAAOC,IAAQ,MACd,MAAMC,GAAM,UAAAD,EAAIE,YAAJ,eAAUC,UAAWH,EACjCnB,EAAUuB,QAAQH,OAiBtB,SACG,cAAC,SAAEI,EAAF,OAAYC,GAAb,SACC,uCACE,SAAC,EAAAC,OAAD,6BACA,SAAC,EAAAC,MAAD,CACEC,MAAM,QACNC,YAAY,kEACZC,UAAWL,EAAOM,MAClBC,MAAK,UAAEP,EAAOM,aAAT,aAAE,EAAcT,QAJvB,UAME,SAAC,EAAAW,MAAD,eACEC,GAAG,SACCV,EAAS,QAAS,CACpBW,SAAU,oBACVC,QAAS,CACPC,MAAO,YACPf,QAAS,sBANf,CASEgB,YAAY,cAGhB,UAAC,EAAAC,gBAAD,kBACE,SAAC,EAAAC,OAAD,CAAQC,KAAK,SAAb,uCACA,SAAC,EAAAlC,WAAD,CAAYmC,KAAK,OAAOjC,MAAMC,EAAAA,EAAAA,MAAYC,UAAY,SAAtD,qC,MC1DL,MAAMgC,EAAsB,IACjC,OACE,SAACC,EAAA,GAAD,WACE,SAAC,KAAD,WACE,SAAC7C,EAAD,SAMR","sources":["webpack://grafana/./public/app/core/components/Signup/VerifyEmail.tsx","webpack://grafana/./public/app/core/components/Signup/VerifyEmailPage.tsx"],"sourcesContent":["import React, { FC, useState } from 'react';\n\nimport { getBackendSrv } from '@grafana/runtime';\nimport { Form, Field, Input, Button, Legend, Container, HorizontalGroup, LinkButton } from '@grafana/ui';\nimport { getConfig } from 'app/core/config';\nimport { useAppNotification } from 'app/core/copy/appNotification';\n\ninterface EmailDTO {\n email: string;\n}\n\nexport const VerifyEmail: FC = () => {\n const notifyApp = useAppNotification();\n const [emailSent, setEmailSent] = useState(false);\n\n const onSubmit = (formModel: EmailDTO) => {\n getBackendSrv()\n .post('/api/user/signup', formModel)\n .then(() => {\n setEmailSent(true);\n })\n .catch((err) => {\n const msg = err.data?.message || err;\n notifyApp.warning(msg);\n });\n };\n\n if (emailSent) {\n return (\n <div>\n <p>An email with a verification link has been sent to the email address. You should receive it shortly.</p>\n <Container margin=\"md\" />\n <LinkButton variant=\"primary\" href={getConfig().appSubUrl + '/signup'}>\n Complete Signup\n </LinkButton>\n </div>\n );\n }\n\n return (\n <Form onSubmit={onSubmit}>\n {({ register, errors }) => (\n <>\n <Legend>Verify Email</Legend>\n <Field\n label=\"Email\"\n description=\"Enter your email address to get a verification link sent to you\"\n invalid={!!errors.email}\n error={errors.email?.message}\n >\n <Input\n id=\"email\"\n {...register('email', {\n required: 'Email is required',\n pattern: {\n value: /^\\S+@\\S+$/,\n message: 'Email is invalid',\n },\n })}\n placeholder=\"Email\"\n />\n </Field>\n <HorizontalGroup>\n <Button type=\"submit\">Send verification email</Button>\n <LinkButton fill=\"text\" href={getConfig().appSubUrl + '/login'}>\n Back to login\n </LinkButton>\n </HorizontalGroup>\n </>\n )}\n </Form>\n );\n};\n","import React, { FC } from 'react';\n\nimport { LoginLayout, InnerBox } from '../Login/LoginLayout';\n\nimport { VerifyEmail } from './VerifyEmail';\n\nexport const VerifyEmailPage: FC = () => {\n return (\n <LoginLayout>\n <InnerBox>\n <VerifyEmail />\n </InnerBox>\n </LoginLayout>\n );\n};\n\nexport default VerifyEmailPage;\n"],"names":["VerifyEmail","notifyApp","useAppNotification","emailSent","setEmailSent","useState","Container","margin","LinkButton","variant","href","getConfig","appSubUrl","Form","onSubmit","formModel","getBackendSrv","post","then","catch","err","msg","data","message","warning","register","errors","Legend","Field","label","description","invalid","email","error","Input","id","required","pattern","value","placeholder","HorizontalGroup","Button","type","fill","VerifyEmailPage","LoginLayout"],"sourceRoot":""}