1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-04 01:23:57 +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:
Daniel James Smith
2024-11-22 18:29:30 +01:00
committed by GitHub
parent 7eb18b8e1a
commit 03aa4fd4d8
10 changed files with 203 additions and 11 deletions

View File

@@ -2,4 +2,16 @@
<bit-container>
<tools-credential-generator />
<bit-item>
<button
type="button"
bitLink
bit-item-content
aria-haspopup="true"
(click)="openHistoryDialog()"
>
{{ "generatorHistory" | i18n }}
<i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
</button>
</bit-item>
</bit-container>

View File

@@ -1,6 +1,10 @@
import { Component } from "@angular/core";
import { GeneratorModule } from "@bitwarden/generator-components";
import { ButtonModule, DialogService, ItemModule, LinkModule } from "@bitwarden/components";
import {
CredentialGeneratorHistoryDialogComponent,
GeneratorModule,
} from "@bitwarden/generator-components";
import { HeaderModule } from "../../layouts/header/header.module";
import { SharedModule } from "../../shared";
@@ -9,6 +13,12 @@ import { SharedModule } from "../../shared";
standalone: true,
selector: "credential-generator",
templateUrl: "credential-generator.component.html",
imports: [SharedModule, HeaderModule, GeneratorModule],
imports: [SharedModule, HeaderModule, GeneratorModule, ItemModule, ButtonModule, LinkModule],
})
export class CredentialGeneratorComponent {}
export class CredentialGeneratorComponent {
constructor(private dialogService: DialogService) {}
openHistoryDialog = () => {
this.dialogService.open(CredentialGeneratorHistoryDialogComponent);
};
}