mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
* first draft at an idea dependency graph * ignore existing errors * remove conflicting rule regarding internal platform logic in libs * review: allow components to import from platform
25 lines
1.0 KiB
TypeScript
25 lines
1.0 KiB
TypeScript
import { Injectable } from "@angular/core";
|
|
|
|
import { ViewPasswordHistoryService } from "@bitwarden/common/vault/abstractions/view-password-history.service";
|
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
|
import { DialogService } from "@bitwarden/components";
|
|
// This import has been flagged as unallowed for this class. It may be involved in a circular dependency loop.
|
|
// eslint-disable-next-line no-restricted-imports
|
|
import { openPasswordHistoryDialog } from "@bitwarden/vault";
|
|
|
|
/**
|
|
* This service is used to display the password history dialog in the vault.
|
|
*/
|
|
@Injectable()
|
|
export class VaultViewPasswordHistoryService 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 } });
|
|
}
|
|
}
|