Removing register component changes.
This commit is contained in:
parent
9b2032238c
commit
75330897d1
|
@ -4,7 +4,7 @@ import { Router } from "@angular/router";
|
||||||
|
|
||||||
import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/auth/components/register.component";
|
import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/auth/components/register.component";
|
||||||
import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service";
|
import { FormValidationErrorsService } from "@bitwarden/angular/platform/abstractions/form-validation-errors.service";
|
||||||
import { LoginEmailService, LoginStrategyServiceAbstraction } from "@bitwarden/auth/common";
|
import { LoginStrategyServiceAbstraction } from "@bitwarden/auth/common";
|
||||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||||
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
||||||
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
|
||||||
|
@ -40,7 +40,6 @@ export class RegisterComponent extends BaseRegisterComponent {
|
||||||
auditService: AuditService,
|
auditService: AuditService,
|
||||||
dialogService: DialogService,
|
dialogService: DialogService,
|
||||||
toastService: ToastService,
|
toastService: ToastService,
|
||||||
loginEmailService: LoginEmailService,
|
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
formValidationErrorService,
|
formValidationErrorService,
|
||||||
|
@ -58,7 +57,6 @@ export class RegisterComponent extends BaseRegisterComponent {
|
||||||
auditService,
|
auditService,
|
||||||
dialogService,
|
dialogService,
|
||||||
toastService,
|
toastService,
|
||||||
loginEmailService,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, Input, OnInit, OnDestroy } from "@angular/core";
|
import { Component, Input, OnInit } from "@angular/core";
|
||||||
import { UntypedFormBuilder } from "@angular/forms";
|
import { UntypedFormBuilder } from "@angular/forms";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ import { AcceptOrganizationInviteService } from "../organization-invite/accept-o
|
||||||
selector: "app-register-form",
|
selector: "app-register-form",
|
||||||
templateUrl: "./register-form.component.html",
|
templateUrl: "./register-form.component.html",
|
||||||
})
|
})
|
||||||
export class RegisterFormComponent extends BaseRegisterComponent implements OnInit, OnDestroy {
|
export class RegisterFormComponent extends BaseRegisterComponent implements OnInit {
|
||||||
@Input() queryParamEmail: string;
|
@Input() queryParamEmail: string;
|
||||||
@Input() queryParamFromOrgInvite: boolean;
|
@Input() queryParamFromOrgInvite: boolean;
|
||||||
@Input() enforcedPolicyOptions: MasterPasswordPolicyOptions;
|
@Input() enforcedPolicyOptions: MasterPasswordPolicyOptions;
|
||||||
|
|
|
@ -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 { AbstractControl, UntypedFormBuilder, ValidatorFn, Validators } from "@angular/forms";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
import { Subject, takeUntil } from "rxjs";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
LoginEmailService,
|
LoginEmailService,
|
||||||
|
@ -35,7 +34,7 @@ import { InputsFieldMatch } from "../validators/inputs-field-match.validator";
|
||||||
import { CaptchaProtectedComponent } from "./captcha-protected.component";
|
import { CaptchaProtectedComponent } from "./captcha-protected.component";
|
||||||
|
|
||||||
@Directive()
|
@Directive()
|
||||||
export class RegisterComponent extends CaptchaProtectedComponent implements OnInit, OnDestroy {
|
export class RegisterComponent extends CaptchaProtectedComponent implements OnInit {
|
||||||
@Input() isInTrialFlow = false;
|
@Input() isInTrialFlow = false;
|
||||||
@Output() createdAccount = new EventEmitter<string>();
|
@Output() createdAccount = new EventEmitter<string>();
|
||||||
|
|
||||||
|
@ -83,8 +82,6 @@ export class RegisterComponent extends CaptchaProtectedComponent implements OnIn
|
||||||
|
|
||||||
protected captchaBypassToken: string = null;
|
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
|
||||||
// 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
|
// 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.
|
// 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
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||||
this.setupCaptcha();
|
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) {
|
async submit(showToast = true) {
|
||||||
|
|
Loading…
Reference in New Issue