1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

[PM-3625] Remove ClientType.DirectoryConnector (#6099)

This commit is contained in:
Oscar Hinton
2023-09-14 16:29:46 +02:00
committed by GitHub
parent fc4379f392
commit 3507d318e5
4 changed files with 5 additions and 23 deletions

View File

@@ -4,7 +4,6 @@ import {
SECURE_STORAGE,
STATE_FACTORY,
STATE_SERVICE_USE_CACHE,
CLIENT_TYPE,
LOCALES_DIRECTORY,
SYSTEM_LANGUAGE,
MEMORY_STORAGE,
@@ -15,7 +14,6 @@ import { PolicyService as PolicyServiceAbstraction } from "@bitwarden/common/adm
import { AuthService as AuthServiceAbstraction } from "@bitwarden/common/auth/abstractions/auth.service";
import { LoginService as LoginServiceAbstraction } from "@bitwarden/common/auth/abstractions/login.service";
import { LoginService } from "@bitwarden/common/auth/services/login.service";
import { ClientType } from "@bitwarden/common/enums";
import { BroadcasterService as BroadcasterServiceAbstraction } from "@bitwarden/common/platform/abstractions/broadcaster.service";
import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto-function.service";
import { CryptoService as CryptoServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto.service";
@@ -82,10 +80,6 @@ const RELOAD_CALLBACK = new InjectionToken<() => any>("RELOAD_CALLBACK");
provide: STATE_FACTORY,
useValue: new StateFactory(GlobalState, Account),
},
{
provide: CLIENT_TYPE,
useValue: ClientType.Desktop,
},
{
provide: RELOAD_CALLBACK,
useValue: null,
@@ -94,12 +88,7 @@ const RELOAD_CALLBACK = new InjectionToken<() => any>("RELOAD_CALLBACK");
{
provide: PlatformUtilsServiceAbstraction,
useClass: ElectronPlatformUtilsService,
deps: [
I18nServiceAbstraction,
MessagingServiceAbstraction,
CLIENT_TYPE,
StateServiceAbstraction,
],
deps: [I18nServiceAbstraction, MessagingServiceAbstraction],
},
{
provide: I18nServiceAbstraction,

View File

@@ -4,7 +4,6 @@ import { ClientType, DeviceType } from "@bitwarden/common/enums";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
import { BiometricMessage, BiometricStorageAction } from "../../types/biometric-message";
import { isDev, isMacAppStore } from "../../utils";
@@ -12,12 +11,7 @@ import { isDev, isMacAppStore } from "../../utils";
export class ElectronPlatformUtilsService implements PlatformUtilsService {
private deviceCache: DeviceType = null;
constructor(
protected i18nService: I18nService,
private messagingService: MessagingService,
private clientType: ClientType.Desktop | ClientType.DirectoryConnector,
private stateService: StateService
) {}
constructor(protected i18nService: I18nService, private messagingService: MessagingService) {}
getDevice(): DeviceType {
if (!this.deviceCache) {
@@ -44,7 +38,7 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService {
}
getClientType() {
return this.clientType;
return ClientType.Desktop;
}
isFirefox(): boolean {

View File

@@ -17,7 +17,6 @@ export const LOGOUT_CALLBACK = new InjectionToken<
export const LOCKED_CALLBACK = new InjectionToken<(userId?: string) => Promise<void>>(
"LOCKED_CALLBACK"
);
export const CLIENT_TYPE = new InjectionToken<boolean>("CLIENT_TYPE");
export const LOCALES_DIRECTORY = new InjectionToken<string>("LOCALES_DIRECTORY");
export const SYSTEM_LANGUAGE = new InjectionToken<string>("SYSTEM_LANGUAGE");
export const LOG_MAC_FAILURES = new InjectionToken<string>("LOG_MAC_FAILURES");

View File

@@ -2,7 +2,7 @@ export enum ClientType {
Web = "web",
Browser = "browser",
Desktop = "desktop",
Mobile = "mobile",
// Mobile = "mobile",
Cli = "cli",
DirectoryConnector = "connector",
// DirectoryConnector = "connector",
}