mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 17:53:39 +00:00
* force viewOnly to be true for emergency access * add input to hide password history, applicable when the view is used from emergency view * add extension refresh version of the emergency view dialog * allow emergency access to view password history - `ViewPasswordHistoryService` accepts a cipher id or CipherView. When a CipherView is included, the history component no longer has to fetch the cipher. * remove unused comments * Add fixme comment for removing non-extension refresh code * refactor password history component to accept a full cipher view - Remove the option to pass in only an id
24 lines
924 B
TypeScript
24 lines
924 B
TypeScript
import { Injectable } from "@angular/core";
|
|
|
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
|
import { DialogService } from "@bitwarden/components";
|
|
|
|
import { ViewPasswordHistoryService } from "../../../../../../libs/common/src/vault/abstractions/view-password-history.service";
|
|
import { openPasswordHistoryDialog } from "../individual-vault/password-history.component";
|
|
|
|
/**
|
|
* This service is used to display the password history dialog in the web vault.
|
|
*/
|
|
@Injectable()
|
|
export class WebViewPasswordHistoryService implements ViewPasswordHistoryService {
|
|
constructor(private dialogService: DialogService) {}
|
|
|
|
/**
|
|
* Opens the password history dialog for the given cipher ID.
|
|
* @param cipherId The ID of the cipher to view the password history for.
|
|
*/
|
|
async viewPasswordHistory(cipher: CipherView) {
|
|
openPasswordHistoryDialog(this.dialogService, { data: { cipher } });
|
|
}
|
|
}
|