1
0
mirror of https://github.com/bitwarden/web synced 2025-12-16 00:03:25 +00:00

generator updates (#1575)

* update generator

* update css

* add link to help article

* update jslib

* fix oss module and user type tip icon

* update jslib

* Revert "update jslib"

This reverts commit b2b13ace5e.

* revert jslib update
This commit is contained in:
Kyle Spearrin
2022-03-31 23:32:57 -04:00
committed by GitHub
parent 2652a2deae
commit cb8a40d9cd
6 changed files with 22 additions and 11 deletions

View File

@@ -0,0 +1,57 @@
import { Component, ViewChild, ViewContainerRef } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
import { GeneratorComponent as BaseGeneratorComponent } from "jslib-angular/components/generator.component";
import { ModalService } from "jslib-angular/services/modal.service";
import { I18nService } from "jslib-common/abstractions/i18n.service";
import { PasswordGenerationService } from "jslib-common/abstractions/passwordGeneration.service";
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
import { StateService } from "jslib-common/abstractions/state.service";
import { UsernameGenerationService } from "jslib-common/abstractions/usernameGeneration.service";
import { PasswordGeneratorHistoryComponent } from "./password-generator-history.component";
@Component({
selector: "app-generator",
templateUrl: "generator.component.html",
})
export class GeneratorComponent extends BaseGeneratorComponent {
@ViewChild("historyTemplate", { read: ViewContainerRef, static: true })
historyModalRef: ViewContainerRef;
constructor(
passwordGenerationService: PasswordGenerationService,
usernameGenerationService: UsernameGenerationService,
stateService: StateService,
platformUtilsService: PlatformUtilsService,
i18nService: I18nService,
route: ActivatedRoute,
private modalService: ModalService
) {
super(
passwordGenerationService,
usernameGenerationService,
platformUtilsService,
stateService,
i18nService,
route,
window
);
}
async history() {
await this.modalService.openViewRef(PasswordGeneratorHistoryComponent, this.historyModalRef);
}
lengthChanged() {
document.getElementById("length").focus();
}
minNumberChanged() {
document.getElementById("min-number").focus();
}
minSpecialChanged() {
document.getElementById("min-special").focus();
}
}