mirror of
https://github.com/bitwarden/browser
synced 2026-02-07 12:13:45 +00:00
[PM-18721] add initializing property
This commit is contained in:
@@ -5,15 +5,26 @@
|
||||
</span>
|
||||
|
||||
<div bitDialogContent>
|
||||
<bit-callout type="warning">{{
|
||||
"emergencyAccessLoggedOutWarning" | i18n: dialogData.grantorName
|
||||
}}</bit-callout>
|
||||
@if (initializing) {
|
||||
<div class="tw-flex tw-items-center tw-justify-center">
|
||||
<i
|
||||
class="bwi bwi-spinner bwi-spin bwi-2x tw-text-muted"
|
||||
title="{{ 'loading' | i18n }}"
|
||||
aria-hidden="true"
|
||||
></i>
|
||||
<span class="tw-sr-only">{{ "loading" | i18n }}</span>
|
||||
</div>
|
||||
} @else {
|
||||
<bit-callout type="warning">{{
|
||||
"emergencyAccessLoggedOutWarning" | i18n: dialogData.grantorName
|
||||
}}</bit-callout>
|
||||
|
||||
<auth-input-password
|
||||
[flow]="inputPasswordFlow"
|
||||
[masterPasswordPolicyOptions]="masterPasswordPolicyOptions"
|
||||
(onPasswordFormSubmit)="handlePasswordFormSubmit($event)"
|
||||
></auth-input-password>
|
||||
<auth-input-password
|
||||
[flow]="inputPasswordFlow"
|
||||
[masterPasswordPolicyOptions]="masterPasswordPolicyOptions"
|
||||
(onPasswordFormSubmit)="handlePasswordFormSubmit($event)"
|
||||
></auth-input-password>
|
||||
}
|
||||
</div>
|
||||
|
||||
<ng-container bitDialogFooter>
|
||||
|
||||
@@ -65,6 +65,7 @@ export class EmergencyAccessTakeoverDialogComponent implements OnInit {
|
||||
@ViewChild(InputPasswordComponent)
|
||||
inputPasswordComponent!: InputPasswordComponent;
|
||||
|
||||
initializing = true;
|
||||
inputPasswordFlow = InputPasswordFlow.ChangePasswordDelegation;
|
||||
masterPasswordPolicyOptions?: MasterPasswordPolicyOptions;
|
||||
|
||||
@@ -80,14 +81,16 @@ export class EmergencyAccessTakeoverDialogComponent implements OnInit {
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
const activeUserId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId));
|
||||
const grantorPolicies = await this.emergencyAccessService.getGrantorPolicies(
|
||||
this.dialogData.emergencyAccessId,
|
||||
);
|
||||
// const activeUserId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId));
|
||||
// const grantorPolicies = await this.emergencyAccessService.getGrantorPolicies(
|
||||
// this.dialogData.emergencyAccessId,
|
||||
// );
|
||||
|
||||
this.masterPasswordPolicyOptions = await firstValueFrom(
|
||||
this.policyService.masterPasswordPolicyOptions$(activeUserId, grantorPolicies),
|
||||
);
|
||||
// this.masterPasswordPolicyOptions = await firstValueFrom(
|
||||
// this.policyService.masterPasswordPolicyOptions$(activeUserId, grantorPolicies),
|
||||
// );
|
||||
|
||||
this.initializing = false;
|
||||
}
|
||||
|
||||
protected handlePrimaryButtonClick = async () => {
|
||||
|
||||
Reference in New Issue
Block a user