1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 22:33:35 +00:00

Add headers for client type and client version (#651)

This commit is contained in:
Oscar Hinton
2022-02-08 11:18:10 +01:00
committed by GitHub
parent 6b8508579f
commit 8130fce404
6 changed files with 35 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
import * as child_process from "child_process";
import { ClientType } from "jslib-common/enums/clientType";
import { DeviceType } from "jslib-common/enums/deviceType";
import { ThemeType } from "jslib-common/enums/themeType";
@@ -9,12 +10,12 @@ import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.se
const open = require("open");
export class CliPlatformUtilsService implements PlatformUtilsService {
identityClientId: string;
clientType: ClientType;
private deviceCache: DeviceType = null;
constructor(identityClientId: string, private packageJson: any) {
this.identityClientId = identityClientId;
constructor(clientType: ClientType, private packageJson: any) {
this.clientType = clientType;
}
getDevice(): DeviceType {
@@ -41,6 +42,10 @@ export class CliPlatformUtilsService implements PlatformUtilsService {
return device.replace("desktop", "");
}
getClientType() {
return this.clientType;
}
isFirefox() {
return false;
}