UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 2.43 kB
(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.13.4`}}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]=`46898c14-e2d9-4356-8c5a-63eff6436d6f`,e._sentryDebugIdIdentifier=`sentry-dbid-46898c14-e2d9-4356-8c5a-63eff6436d6f`)})()}catch{}import{$ as e,Ft as t,N as n,S as r,w as i}from"./vue.runtime.esm-bundler-D9KLAxvJ.js";import{bt as a}from"./_MapCache-CUJwh2qp.js";import"./src-wni2AGA3.js";import"./sanitize-html-my1ogl5v.js";import{As as o,Tr as s,t as c}from"./users.store-BHWXXawf.js";import"./constants-CIP7tKq1.js";import"./merge-BqvKZ38d.js";import"./_baseOrderBy-CaKruttV.js";import"./dateformat-CYfyw486.js";import"./useDebounce-CTeIt-cH.js";import"./sso.store-DmM4R1YZ.js";import{t as l}from"./AuthView-CVr-30Cu.js";var u=n({__name:`ForgotMyPasswordView`,setup(n){let u=o(),d=c(),f=s(),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-MiD6C1An.js.map