mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
[PM-16858] - adjust generator dialog action button to match browser extension UI (#12788)
* adjust generator dialog buttons to match browser extension UI * put dialog label into generator config * fix types. remove i18n key * use event emitted pattern for getting algorithm config * favor arrow function * move function call * append key to i18n prop * fix test
This commit is contained in:
@@ -93,6 +93,10 @@ export class PasswordGeneratorComponent implements OnInit, OnDestroy {
|
||||
@Output()
|
||||
readonly onGenerated = new EventEmitter<GeneratedCredential>();
|
||||
|
||||
/** emits algorithm info when the selected algorithm changes */
|
||||
@Output()
|
||||
readonly onAlgorithm = new EventEmitter<AlgorithmInfo>();
|
||||
|
||||
async ngOnInit() {
|
||||
if (this.userId) {
|
||||
this.userId$.next(this.userId);
|
||||
@@ -185,6 +189,7 @@ export class PasswordGeneratorComponent implements OnInit, OnDestroy {
|
||||
// template bindings refresh immediately
|
||||
this.zone.run(() => {
|
||||
this.algorithm$.next(algorithm);
|
||||
this.onAlgorithm.next(algorithm);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -78,6 +78,10 @@ export class UsernameGeneratorComponent implements OnInit, OnDestroy {
|
||||
@Output()
|
||||
readonly onGenerated = new EventEmitter<GeneratedCredential>();
|
||||
|
||||
/** emits algorithm info when the selected algorithm changes */
|
||||
@Output()
|
||||
readonly onAlgorithm = new EventEmitter<AlgorithmInfo>();
|
||||
|
||||
/** Removes bottom margin from internal elements */
|
||||
@Input({ transform: coerceBooleanProperty }) disableMargin = false;
|
||||
|
||||
@@ -247,6 +251,7 @@ export class UsernameGeneratorComponent implements OnInit, OnDestroy {
|
||||
// template bindings refresh immediately
|
||||
this.zone.run(() => {
|
||||
this.algorithm$.next(algorithm);
|
||||
this.onAlgorithm.next(algorithm);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user