Client & Version headers (#1434)

This commit is contained in:
Oscar Hinton 2022-02-08 13:22:31 +01:00 committed by GitHub
parent 64416c9406
commit e68ab0031d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

2
jslib

@ -1 +1 @@
Subproject commit 6c08b408470709afb1f6f5bc9d0e0d06d02fa1f5
Subproject commit 8130fce40459d6597239eb283e1c8dfc28edb16f

View File

@ -1,5 +1,6 @@
import Swal, { SweetAlertIcon } from "sweetalert2";
import { ClientType } from "jslib-common/enums/clientType";
import { DeviceType } from "jslib-common/enums/deviceType";
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";
export class WebPlatformUtilsService implements PlatformUtilsService {
identityClientId: string = "web";
private browserCache: DeviceType = null;
private prefersColorSchemeDark = window.matchMedia("(prefers-color-scheme: dark)");
@ -59,6 +58,10 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
return device.replace("browser", "");
}
getClientType() {
return ClientType.Web;
}
isFirefox(): boolean {
return this.getDevice() === DeviceType.FirefoxBrowser;
}