mirror of
https://github.com/bitwarden/web
synced 2025-12-15 07:43:16 +00:00
Client & Version headers (#1434)
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 6c08b40847...8130fce404
@@ -1,5 +1,6 @@
|
|||||||
import Swal, { SweetAlertIcon } from "sweetalert2";
|
import Swal, { SweetAlertIcon } from "sweetalert2";
|
||||||
|
|
||||||
|
import { ClientType } from "jslib-common/enums/clientType";
|
||||||
import { DeviceType } from "jslib-common/enums/deviceType";
|
import { DeviceType } from "jslib-common/enums/deviceType";
|
||||||
import { ThemeType } from "jslib-common/enums/themeType";
|
import { ThemeType } from "jslib-common/enums/themeType";
|
||||||
|
|
||||||
@@ -10,8 +11,6 @@ import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.se
|
|||||||
import { StateService } from "jslib-common/abstractions/state.service";
|
import { StateService } from "jslib-common/abstractions/state.service";
|
||||||
|
|
||||||
export class WebPlatformUtilsService implements PlatformUtilsService {
|
export class WebPlatformUtilsService implements PlatformUtilsService {
|
||||||
identityClientId: string = "web";
|
|
||||||
|
|
||||||
private browserCache: DeviceType = null;
|
private browserCache: DeviceType = null;
|
||||||
private prefersColorSchemeDark = window.matchMedia("(prefers-color-scheme: dark)");
|
private prefersColorSchemeDark = window.matchMedia("(prefers-color-scheme: dark)");
|
||||||
|
|
||||||
@@ -59,6 +58,10 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
|
|||||||
return device.replace("browser", "");
|
return device.replace("browser", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getClientType() {
|
||||||
|
return ClientType.Web;
|
||||||
|
}
|
||||||
|
|
||||||
isFirefox(): boolean {
|
isFirefox(): boolean {
|
||||||
return this.getDevice() === DeviceType.FirefoxBrowser;
|
return this.getDevice() === DeviceType.FirefoxBrowser;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user