mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
[SG-632] - Change forwarded providers radio buttons list to dropdown (#4045)
* SG-632 - Changed forwarded providers list of radio buttons to dropdown * SG-632 - Added role attributes to improve accessibility. * SG-632 - Added sorting to array and empty option * SG-632 - Fix styling to match standards.
This commit is contained in:
@@ -70,13 +70,7 @@ export class GeneratorComponent implements OnInit {
|
||||
];
|
||||
this.subaddressOptions = [{ name: i18nService.t("random"), value: "random" }];
|
||||
this.catchallOptions = [{ name: i18nService.t("random"), value: "random" }];
|
||||
this.forwardOptions = [
|
||||
{ name: "SimpleLogin", value: "simplelogin" },
|
||||
{ name: "AnonAddy", value: "anonaddy" },
|
||||
{ name: "Firefox Relay", value: "firefoxrelay" },
|
||||
{ name: "Fastmail", value: "fastmail" },
|
||||
{ name: "DuckDuckGo", value: "duckduckgo" },
|
||||
];
|
||||
this.initForwardOptions();
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
@@ -239,4 +233,21 @@ export class GeneratorComponent implements OnInit {
|
||||
this.enforcedPasswordPolicyOptions
|
||||
);
|
||||
}
|
||||
|
||||
private async initForwardOptions() {
|
||||
this.forwardOptions = [
|
||||
{ name: "AnonAddy", value: "anonaddy" },
|
||||
{ name: "DuckDuckGo", value: "duckduckgo" },
|
||||
{ name: "Fastmail", value: "fastmail" },
|
||||
{ name: "Firefox Relay", value: "firefoxrelay" },
|
||||
{ name: "SimpleLogin", value: "simplelogin" },
|
||||
];
|
||||
|
||||
this.usernameOptions = await this.usernameGenerationService.getOptions();
|
||||
if (this.usernameOptions.forwardedService == null) {
|
||||
this.forwardOptions.push({ name: "", value: null });
|
||||
}
|
||||
|
||||
this.forwardOptions = this.forwardOptions.sort((a, b) => a.name.localeCompare(b.name));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user