diff --git a/src/app/accounts/register.component.ts b/src/app/accounts/register.component.ts index f282ccddfb..df303364a8 100644 --- a/src/app/accounts/register.component.ts +++ b/src/app/accounts/register.component.ts @@ -65,6 +65,12 @@ export class RegisterComponent { } catch { } } + togglePassword(confirmField: boolean) { + this.analytics.eventTrack.next({ action: 'Toggled Master Password on Register' }); + this.showPassword = !this.showPassword; + document.getElementById(confirmField ? 'masterPasswordRetype' : 'masterPassword').focus(); + } + private async register() { this.email = this.email.toLowerCase(); const key = this.cryptoService.makeKey(this.masterPassword, this.email); @@ -73,10 +79,4 @@ export class RegisterComponent { const request = new RegisterRequest(this.email, hashedPassword, this.hint, encKey.encryptedString); await this.apiService.postRegister(request); } - - togglePassword(confirmField: boolean) { - this.analytics.eventTrack.next({ action: 'Toggled Master Password on Register' }); - this.showPassword = !this.showPassword; - document.getElementById(confirmField ? 'masterPasswordRetype' : 'masterPassword').focus(); - } }