1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-27 07:39:49 +01:00

[PM-14002] Fix username generator from vault item (#11714)

* Fix "Forwarded email alias" not showing in drop-down

* Fixed username and forwarder options not showing
Options were being translated twice

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
Daniel James Smith 2024-10-25 18:15:48 +02:00 committed by GitHub
parent ab98bef28f
commit 10a662cc35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -108,7 +108,7 @@ export class UsernameGeneratorComponent implements OnInit, OnDestroy {
map((algorithms) => {
const usernames = algorithms.filter((a) => !isForwarderIntegration(a.id));
const usernameOptions = this.toOptions(usernames);
usernameOptions.push({ value: FORWARDER, label: this.i18nService.t("forwarder") });
usernameOptions.push({ value: FORWARDER, label: this.i18nService.t("forwardedEmail") });
const forwarders = algorithms.filter((a) => isForwarderIntegration(a.id));
const forwarderOptions = this.toOptions(forwarders);
@ -413,7 +413,7 @@ export class UsernameGeneratorComponent implements OnInit, OnDestroy {
private toOptions(algorithms: AlgorithmInfo[]) {
const options: Option<string>[] = algorithms.map((algorithm) => ({
value: JSON.stringify(algorithm.id),
label: this.i18nService.t(algorithm.name),
label: algorithm.name,
}));
return options;