Client & Version headers (#1434)
This commit is contained in:
parent
64416c9406
commit
e68ab0031d
2
jslib
2
jslib
|
@ -1 +1 @@
|
||||||
Subproject commit 6c08b408470709afb1f6f5bc9d0e0d06d02fa1f5
|
Subproject commit 8130fce40459d6597239eb283e1c8dfc28edb16f
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue