1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

Client and version headers (#2320)

This commit is contained in:
Oscar Hinton
2022-02-08 13:22:20 +01:00
committed by GitHub
parent 7d43835ea2
commit 0a44bf4dd9
2 changed files with 6 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
import { BrowserApi } from "../browser/browserApi";
import { SafariApp } from "../browser/safariApp";
import { ClientType } from "jslib-common/enums/clientType";
import { DeviceType } from "jslib-common/enums/deviceType";
import { ThemeType } from "jslib-common/enums/themeType";
@@ -12,8 +13,6 @@ import { StateService } from "../services/abstractions/state.service";
const DialogPromiseExpiration = 600000; // 10 minutes
export default class BrowserPlatformUtilsService implements PlatformUtilsService {
identityClientId: string = "browser";
private showDialogResolves = new Map<number, { resolve: (value: boolean) => void; date: Date }>();
private passwordDialogResolves = new Map<
number,
@@ -63,6 +62,10 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
return device.replace("extension", "");
}
getClientType(): ClientType {
return ClientType.Browser;
}
isFirefox(): boolean {
return this.getDevice() === DeviceType.FirefoxExtension;
}