1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +00:00

[PM-21724] - add safari and firefox to list of potential browser vendors (#14857)

* add safari and firefox to list of potential browser vendors

* use browserClientVendorExtended

* handle unknown browser client vendor
This commit is contained in:
Jordan Aasen
2025-05-29 13:01:07 -07:00
committed by GitHub
parent bb9006e6e4
commit eed288d797

View File

@@ -334,11 +334,24 @@ export class AutofillComponent implements OnInit {
return null; return null;
} }
get browserClientVendorExtended() {
if (this.browserClientVendor !== BrowserClientVendors.Unknown) {
return this.browserClientVendor;
}
if (this.platformUtilsService.isFirefox()) {
return "Firefox";
}
if (this.platformUtilsService.isSafari()) {
return "Safari";
}
return BrowserClientVendors.Unknown;
}
get spotlightButtonText() { get spotlightButtonText() {
if (this.browserClientVendor === BrowserClientVendors.Unknown) { if (this.browserClientVendorExtended === BrowserClientVendors.Unknown) {
return this.i18nService.t("turnOffAutofill"); return this.i18nService.t("turnOffAutofill");
} }
return this.i18nService.t("turnOffBrowserAutofill", this.browserClientVendor); return this.i18nService.t("turnOffBrowserAutofill", this.browserClientVendorExtended);
} }
async dismissSpotlight() { async dismissSpotlight() {