n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 2.21 kB
JavaScript
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`n8n@2.16.1`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`e791d2f9-456e-4ec1-9f17-adce0de418a2`,e._sentryDebugIdIdentifier=`sentry-dbid-e791d2f9-456e-4ec1-9f17-adce0de418a2`)})()}catch{}import{$ as e,Ft as t,N as n,S as r,w as i}from"./vue.runtime.esm-bundler-C3C09Zii.js";import{at as a}from"./core-Bz5WjPxS.js";import{Pn as o,t as s}from"./users.store-xP93bV7X.js";import{t as c}from"./settings.store-CAFiYCMH.js";import{t as l}from"./AuthView-Cz7XUKDy.js";var u=n({__name:`ForgotMyPasswordView`,setup(n){let u=c(),d=s(),f=o(),p=a(),m=t(!1),h=r(()=>{let e=[{name:`email`,properties:{label:p.baseText(`auth.email`),type:`email`,required:!0,validationRules:[{name:`VALID_EMAIL`}],autocomplete:`email`,capitalize:!0,focusInitially:!0}}],t=[{name:`no-smtp-warning`,properties:{label:p.baseText(`forgotPassword.noSMTPToSendEmailWarning`),type:`info`}}],n={title:p.baseText(`forgotPassword.recoverPassword`),redirectText:p.baseText(`forgotPassword.returnToSignIn`),redirectLink:`/signin`};return u.isSmtpSetup?{...n,buttonText:p.baseText(`forgotPassword.getRecoveryLink`),inputs:e}:{...n,inputs:t}}),g=e=>`email`in e,_=async e=>{if(g(e)){try{m.value=!0,await d.sendForgotPasswordEmail(e),f.showMessage({type:`success`,title:p.baseText(`forgotPassword.recoveryEmailSent`),message:p.baseText(`forgotPassword.emailSentIfExists`,{interpolate:{email:e.email}})})}catch(e){let t=p.baseText(`forgotPassword.smtpErrorContactAdministrator`);if(e.httpStatusCode){let{httpStatusCode:n}=e;n===429?t=p.baseText(`forgotPassword.tooManyRequests`):e.httpStatusCode===422&&(t=p.baseText(e.message)),f.showMessage({type:`error`,title:p.baseText(`forgotPassword.sendingEmailError`),message:t})}}m.value=!1}};return(t,n)=>(e(),i(l,{form:h.value,"form-loading":m.value,onSubmit:_},null,8,[`form`,`form-loading`]))}});export{u as default};
//# sourceMappingURL=ForgotMyPasswordView-M0mPmgYZ.js.map