mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 11:43:46 +00:00
[PM-7896] Cipher Form - Additional Options section (#9928)
* [PM-7896] Adjust cipher form container to expose config and original cipher view for children * [PM-7896] Add initial additional options section * [PM-7896] Add tests * [PM-7896] Add TODO comments for Custom Fields * [PM-7896] Hide password reprompt checkbox when unavailable * [PM-7896] Fix storybook
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
import { lastValueFrom } from "rxjs";
|
||||
import { firstValueFrom, lastValueFrom } from "rxjs";
|
||||
|
||||
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
|
||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||
import { CipherRepromptType } from "@bitwarden/common/vault/enums";
|
||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||
import { DialogService } from "@bitwarden/components";
|
||||
@@ -19,6 +20,10 @@ export class PasswordRepromptService {
|
||||
private userVerificationService: UserVerificationService,
|
||||
) {}
|
||||
|
||||
enabled$ = Utils.asyncToObservable(() =>
|
||||
this.userVerificationService.hasMasterPasswordAndMasterKeyHash(),
|
||||
);
|
||||
|
||||
protectedFields() {
|
||||
return ["TOTP", "Password", "H_Field", "Card Number", "Security Code"];
|
||||
}
|
||||
@@ -45,7 +50,7 @@ export class PasswordRepromptService {
|
||||
return result === true;
|
||||
}
|
||||
|
||||
async enabled() {
|
||||
return await this.userVerificationService.hasMasterPasswordAndMasterKeyHash();
|
||||
enabled() {
|
||||
return firstValueFrom(this.enabled$);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user