1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 11:13:46 +00:00

[PM-2054] Updated Password Generator History to use Component Library on Web (#5414)

* [PM-2054] Updated Password Generator History to use Component Library

* [PM-2054] Corrected paddings

* [PM-2054] Added missing type to buttons

* [PM-2054] Removed unused imports and run prettier

* [PM-2054] Swap list by bit-table
This commit is contained in:
aj-rosado
2023-05-15 12:01:28 +01:00
committed by GitHub
parent e40c9902eb
commit 44fd063dc1
3 changed files with 53 additions and 68 deletions

View File

@@ -1,7 +1,7 @@
import { Component, ViewChild, ViewContainerRef } from "@angular/core";
import { Component } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
import { ModalService } from "@bitwarden/angular/services/modal.service";
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
import { GeneratorComponent as BaseGeneratorComponent } from "@bitwarden/angular/tools/generator/components/generator.component";
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/abstractions/log.service";
@@ -17,9 +17,6 @@ import { PasswordGeneratorHistoryComponent } from "./password-generator-history.
templateUrl: "generator.component.html",
})
export class GeneratorComponent extends BaseGeneratorComponent {
@ViewChild("historyTemplate", { read: ViewContainerRef, static: true })
historyModalRef: ViewContainerRef;
constructor(
passwordGenerationService: PasswordGenerationServiceAbstraction,
usernameGenerationService: UsernameGenerationServiceAbstraction,
@@ -28,7 +25,7 @@ export class GeneratorComponent extends BaseGeneratorComponent {
i18nService: I18nService,
logService: LogService,
route: ActivatedRoute,
private modalService: ModalService
private dialogService: DialogServiceAbstraction
) {
super(
passwordGenerationService,
@@ -47,7 +44,7 @@ export class GeneratorComponent extends BaseGeneratorComponent {
}
async history() {
await this.modalService.openViewRef(PasswordGeneratorHistoryComponent, this.historyModalRef);
this.dialogService.open(PasswordGeneratorHistoryComponent);
}
lengthChanged() {