1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

Removing register component changes.

This commit is contained in:
Alec Rippberger
2024-10-10 15:08:03 -05:00
parent 9b2032238c
commit 75330897d1
3 changed files with 5 additions and 24 deletions

View File

@@ -1,7 +1,6 @@
import { Directive, EventEmitter, Input, OnDestroy, OnInit, Output } from "@angular/core";
import { Directive, EventEmitter, Input, OnInit, Output } from "@angular/core";
import { AbstractControl, UntypedFormBuilder, ValidatorFn, Validators } from "@angular/forms";
import { Router } from "@angular/router";
import { Subject, takeUntil } from "rxjs";
import {
LoginEmailService,
@@ -35,7 +34,7 @@ import { InputsFieldMatch } from "../validators/inputs-field-match.validator";
import { CaptchaProtectedComponent } from "./captcha-protected.component";
@Directive()
export class RegisterComponent extends CaptchaProtectedComponent implements OnInit, OnDestroy {
export class RegisterComponent extends CaptchaProtectedComponent implements OnInit {
@Input() isInTrialFlow = false;
@Output() createdAccount = new EventEmitter<string>();
@@ -83,8 +82,6 @@ export class RegisterComponent extends CaptchaProtectedComponent implements OnIn
protected captchaBypassToken: string = null;
protected destroy$ = new Subject<void>();
// allows for extending classes to modify the register request before sending
// allows for extending classes to modify the register request before sending
// currently used by web to add organization invitation details
@@ -117,20 +114,6 @@ export class RegisterComponent extends CaptchaProtectedComponent implements OnIn
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.setupCaptcha();
/**
* If the user has a login email, set the email field to the login email.
*/
this.loginEmailService.loginEmail$.pipe(takeUntil(this.destroy$)).subscribe((email) => {
if (email) {
this.formGroup.patchValue({ email });
}
});
}
ngOnDestroy() {
this.destroy$.next();
this.destroy$.complete();
}
async submit(showToast = true) {