mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-13 00:51:45 +01:00
handle master password input focus
This commit is contained in:
parent
70d15fb4d2
commit
00a29b3795
@ -70,7 +70,13 @@
|
||||
<!-----------------------------------
|
||||
UI STATE 2: Master Password Entry
|
||||
------------------------------------>
|
||||
<ng-container *ngIf="validatedEmail">
|
||||
<!--
|
||||
Why not use <ng-container *ngIf="validatedEmail"> to display this section?
|
||||
Because we want access to the masterPasswordInput reference in the class file.
|
||||
- Using a hidden div allows us to access the reference without rendering the div initially.
|
||||
- Using *ngIf would not allow us to access the reference without rendering the ng-container initially.
|
||||
-->
|
||||
<div [ngClass]="{ 'tw-hidden': !validatedEmail }">
|
||||
<div class="tw-mb-6 tw-h-28">
|
||||
<!-- Master Password input -->
|
||||
<bit-form-field class="!tw-mb-1">
|
||||
@ -133,5 +139,5 @@
|
||||
<p class="tw-mb-1">{{ "loggingInAs" | i18n }} {{ loggedEmail }}</p>
|
||||
<a [routerLink]="[]" (click)="toggleValidateEmail(false)">{{ "notYou" | i18n }}</a>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -31,6 +31,7 @@ import {
|
||||
ButtonModule,
|
||||
CheckboxModule,
|
||||
FormFieldModule,
|
||||
IconButtonModule,
|
||||
ToastService,
|
||||
} from "@bitwarden/components";
|
||||
|
||||
@ -45,6 +46,7 @@ import { LoginService } from "./login.service";
|
||||
CheckboxModule,
|
||||
CommonModule,
|
||||
FormFieldModule,
|
||||
IconButtonModule,
|
||||
JslibModule,
|
||||
ReactiveFormsModule,
|
||||
RouterModule,
|
||||
@ -117,12 +119,11 @@ export class LoginComponentV2 implements OnInit, OnDestroy {
|
||||
|
||||
if (this.clientType === ClientType.Web) {
|
||||
// If there's an existing org invite, use it to get the password policies
|
||||
const { policies, isPolicyAndAutoEnrollEnabled, enforcedPasswordPolicyOptions } =
|
||||
await this.loginService.getOrgPolicies();
|
||||
const orgPolicies = await this.loginService.getOrgPolicies();
|
||||
|
||||
this.policies = policies;
|
||||
this.showResetPasswordAutoEnrollWarning = isPolicyAndAutoEnrollEnabled;
|
||||
this.enforcedPasswordPolicyOptions = enforcedPasswordPolicyOptions;
|
||||
this.policies = orgPolicies?.policies;
|
||||
this.showResetPasswordAutoEnrollWarning = orgPolicies?.isPolicyAndAutoEnrollEnabled;
|
||||
this.enforcedPasswordPolicyOptions = orgPolicies?.enforcedPasswordPolicyOptions;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user