Replace loggedEmail with this.emailFormControl.value.
This commit is contained in:
parent
b5cdf4d6f7
commit
a49c4458d3
|
@ -98,10 +98,6 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||||
return this.formGroup.controls.email;
|
return this.formGroup.controls.email;
|
||||||
}
|
}
|
||||||
|
|
||||||
get loggedEmail(): string {
|
|
||||||
return this.formGroup.value.email;
|
|
||||||
}
|
|
||||||
|
|
||||||
get uiState(): LoginUiState {
|
get uiState(): LoginUiState {
|
||||||
return this.validatedEmail ? LoginUiState.MASTER_PASSWORD_ENTRY : LoginUiState.EMAIL_ENTRY;
|
return this.validatedEmail ? LoginUiState.MASTER_PASSWORD_ENTRY : LoginUiState.EMAIL_ENTRY;
|
||||||
}
|
}
|
||||||
|
@ -476,12 +472,17 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
private focusInput() {
|
private focusInput() {
|
||||||
const email = this.loggedEmail;
|
document
|
||||||
document.getElementById(email == null || email === "" ? "email" : "masterPassword")?.focus();
|
.getElementById(
|
||||||
|
this.emailFormControl.value == null || this.emailFormControl.value === ""
|
||||||
|
? "email"
|
||||||
|
: "masterPassword",
|
||||||
|
)
|
||||||
|
?.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async defaultOnInit(): Promise<void> {
|
private async defaultOnInit(): Promise<void> {
|
||||||
await this.getLoginWithDevice(this.loggedEmail);
|
await this.getLoginWithDevice(this.emailFormControl.value);
|
||||||
|
|
||||||
// If there's an existing org invite, use it to get the password policies
|
// If there's an existing org invite, use it to get the password policies
|
||||||
const orgPolicies = await this.loginComponentService.getOrgPolicies();
|
const orgPolicies = await this.loginComponentService.getOrgPolicies();
|
||||||
|
|
Loading…
Reference in New Issue