mirror of
https://github.com/bitwarden/browser
synced 2026-01-05 10:03:21 +00:00
[PM-13667] Add button to open credential history on web (#12100)
* Create CredentialGeneratorHistoryDialogComponent to be re-used on web and desktop * Add button to open credential histpry on web * Add button to open credential history on desktop (#12101) - Register route to open new CredentialGeneratorHistoryDialogComponent when FeatureFlag/GeneratorToolsModernization is enabled - Add button to credential generator - Add missing keys to en/messages.json Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com> --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7eb18b8e1a
commit
03aa4fd4d8
@@ -62,6 +62,7 @@ import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.servi
|
||||
import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||
import { CipherType } from "@bitwarden/common/vault/enums";
|
||||
import { DialogService, ToastOptions, ToastService } from "@bitwarden/components";
|
||||
import { CredentialGeneratorHistoryDialogComponent } from "@bitwarden/generator-components";
|
||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/generator-legacy";
|
||||
import { KeyService, BiometricStateService } from "@bitwarden/key-management";
|
||||
|
||||
@@ -324,10 +325,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
await this.deleteAccount();
|
||||
break;
|
||||
case "openPasswordHistory":
|
||||
await this.openModal<PasswordGeneratorHistoryComponent>(
|
||||
PasswordGeneratorHistoryComponent,
|
||||
this.passwordHistoryRef,
|
||||
);
|
||||
await this.openGeneratorHistory();
|
||||
break;
|
||||
case "showToast":
|
||||
this.toastService._showToast(message);
|
||||
@@ -558,6 +556,21 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
async openGeneratorHistory() {
|
||||
const isGeneratorSwapEnabled = await this.configService.getFeatureFlag(
|
||||
FeatureFlag.GeneratorToolsModernization,
|
||||
);
|
||||
if (isGeneratorSwapEnabled) {
|
||||
await this.dialogService.open(CredentialGeneratorHistoryDialogComponent);
|
||||
return;
|
||||
}
|
||||
|
||||
await this.openModal<PasswordGeneratorHistoryComponent>(
|
||||
PasswordGeneratorHistoryComponent,
|
||||
this.passwordHistoryRef,
|
||||
);
|
||||
}
|
||||
|
||||
private async updateAppMenu() {
|
||||
let updateRequest: MenuUpdateRequest;
|
||||
const stateAccounts = await firstValueFrom(this.accountService.accounts$);
|
||||
|
||||
Reference in New Issue
Block a user