n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 2.76 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]=`4b61b572-5abe-457d-b956-e55dd7195e23`,e._sentryDebugIdIdentifier=`sentry-dbid-4b61b572-5abe-457d-b956-e55dd7195e23`)})()}catch{}import{$ as e,Ft as t,N as n,S as r,X as i,w as a}from"./vue.runtime.esm-bundler-C3C09Zii.js";import{at as o}from"./core-Bz5WjPxS.js";import{ct as s,lt as c}from"./src-XqE2yCpG.js";import{Pn as l,t as u}from"./users.store-xP93bV7X.js";import{Qo as d}from"./constants-DuQbSl-q.js";import{t as f}from"./AuthView-Cz7XUKDy.js";var p=n({__name:`SignupView`,setup(n){let p=u(),m=l(),h=o(),g=c(),_=s(),v={title:h.baseText(`auth.signup.setupYourAccount`),buttonText:h.baseText(`auth.signup.finishAccountSetup`),inputs:[{name:`firstName`,properties:{label:h.baseText(`auth.firstName`),maxlength:32,required:!0,autocomplete:`given-name`,capitalize:!0,focusInitially:!0}},{name:`lastName`,properties:{label:h.baseText(`auth.lastName`),maxlength:32,required:!0,autocomplete:`family-name`,capitalize:!0}},{name:`password`,properties:{label:h.baseText(`auth.password`),type:`password`,validationRules:[{name:`DEFAULT_PASSWORD_RULES`}],required:!0,infoText:h.baseText(`auth.defaultPasswordRequirements`),autocomplete:`new-password`,capitalize:!0}},{name:`agree`,properties:{label:h.baseText(`auth.agreement.label`),type:`checkbox`}}]},y=t(!1),b=t(null),x=t(void 0),S=r(()=>b.value?h.baseText(`settings.signup.signUpInviterInfo`,{interpolate:{firstName:b.value.firstName,lastName:b.value.lastName}}):``);i(async()=>{let e=w(`token`);try{if(!e)throw Error(h.baseText(`auth.signup.missingTokenError`));x.value=e,b.value=(await p.validateSignupToken({token:x.value})).inviter}catch(e){m.showError(e,h.baseText(`auth.signup.tokenValidationError`)),g.replace({name:d.SIGNIN})}});async function C(e){if(!x.value){m.showError(Error(h.baseText(`auth.signup.tokenValidationError`)),h.baseText(`auth.signup.setupYourAccountError`));return}try{if(y.value=!0,await p.acceptInvitation({...e,token:x.value}),e.agree===!0)try{await p.submitContactEmail(e.email.toString(),e.agree)}catch{}await g.push({name:d.HOMEPAGE})}catch(e){m.showError(e,h.baseText(`auth.signup.setupYourAccountError`))}y.value=!1}function w(e){return!_.query[e]||typeof _.query[e]!=`string`?null:_.query[e]}return(t,n)=>(e(),a(f,{form:v,"form-loading":y.value,subtitle:S.value,onSubmit:C},null,8,[`form-loading`,`subtitle`]))}});export{p as default};
//# sourceMappingURL=SignupView-2qB_EZYl.js.map