mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
[PM-8282] credential generator (#11398)
* credential generator browser ui * switch browser generate screen to extension refresh flag * consolidate generator components into module * add `@bitwarden/generator-components` readme * normalize generator component rx subscriptions
This commit is contained in:
@@ -3,10 +3,7 @@ import { ComponentFixture, TestBed } from "@angular/core/testing";
|
||||
import { By } from "@angular/platform-browser";
|
||||
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import {
|
||||
PasswordGeneratorComponent,
|
||||
UsernameGeneratorComponent,
|
||||
} from "@bitwarden/generator-components";
|
||||
import { GeneratorModule } from "@bitwarden/generator-components";
|
||||
import { CipherFormGeneratorComponent } from "@bitwarden/vault";
|
||||
|
||||
@Component({
|
||||
@@ -37,7 +34,7 @@ describe("CipherFormGeneratorComponent", () => {
|
||||
providers: [{ provide: I18nService, useValue: { t: (key: string) => key } }],
|
||||
})
|
||||
.overrideComponent(CipherFormGeneratorComponent, {
|
||||
remove: { imports: [PasswordGeneratorComponent, UsernameGeneratorComponent] },
|
||||
remove: { imports: [GeneratorModule] },
|
||||
add: { imports: [MockPasswordGeneratorComponent, MockUsernameGeneratorComponent] },
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
||||
|
||||
import { SectionComponent } from "@bitwarden/components";
|
||||
import {
|
||||
PasswordGeneratorComponent,
|
||||
UsernameGeneratorComponent,
|
||||
} from "@bitwarden/generator-components";
|
||||
import { GeneratorModule } from "@bitwarden/generator-components";
|
||||
import { GeneratedCredential } from "@bitwarden/generator-core";
|
||||
|
||||
/**
|
||||
@@ -16,7 +12,7 @@ import { GeneratedCredential } from "@bitwarden/generator-core";
|
||||
selector: "vault-cipher-form-generator",
|
||||
templateUrl: "./cipher-form-generator.component.html",
|
||||
standalone: true,
|
||||
imports: [CommonModule, SectionComponent, PasswordGeneratorComponent, UsernameGeneratorComponent],
|
||||
imports: [CommonModule, GeneratorModule],
|
||||
})
|
||||
export class CipherFormGeneratorComponent {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user