mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +00:00
[PM-3625] Remove ClientType.DirectoryConnector (#6099)
This commit is contained in:
@@ -4,7 +4,6 @@ import {
|
|||||||
SECURE_STORAGE,
|
SECURE_STORAGE,
|
||||||
STATE_FACTORY,
|
STATE_FACTORY,
|
||||||
STATE_SERVICE_USE_CACHE,
|
STATE_SERVICE_USE_CACHE,
|
||||||
CLIENT_TYPE,
|
|
||||||
LOCALES_DIRECTORY,
|
LOCALES_DIRECTORY,
|
||||||
SYSTEM_LANGUAGE,
|
SYSTEM_LANGUAGE,
|
||||||
MEMORY_STORAGE,
|
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 { AuthService as AuthServiceAbstraction } from "@bitwarden/common/auth/abstractions/auth.service";
|
||||||
import { LoginService as LoginServiceAbstraction } from "@bitwarden/common/auth/abstractions/login.service";
|
import { LoginService as LoginServiceAbstraction } from "@bitwarden/common/auth/abstractions/login.service";
|
||||||
import { LoginService } from "@bitwarden/common/auth/services/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 { BroadcasterService as BroadcasterServiceAbstraction } from "@bitwarden/common/platform/abstractions/broadcaster.service";
|
||||||
import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto-function.service";
|
import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto-function.service";
|
||||||
import { CryptoService as CryptoServiceAbstraction } from "@bitwarden/common/platform/abstractions/crypto.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,
|
provide: STATE_FACTORY,
|
||||||
useValue: new StateFactory(GlobalState, Account),
|
useValue: new StateFactory(GlobalState, Account),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
provide: CLIENT_TYPE,
|
|
||||||
useValue: ClientType.Desktop,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
provide: RELOAD_CALLBACK,
|
provide: RELOAD_CALLBACK,
|
||||||
useValue: null,
|
useValue: null,
|
||||||
@@ -94,12 +88,7 @@ const RELOAD_CALLBACK = new InjectionToken<() => any>("RELOAD_CALLBACK");
|
|||||||
{
|
{
|
||||||
provide: PlatformUtilsServiceAbstraction,
|
provide: PlatformUtilsServiceAbstraction,
|
||||||
useClass: ElectronPlatformUtilsService,
|
useClass: ElectronPlatformUtilsService,
|
||||||
deps: [
|
deps: [I18nServiceAbstraction, MessagingServiceAbstraction],
|
||||||
I18nServiceAbstraction,
|
|
||||||
MessagingServiceAbstraction,
|
|
||||||
CLIENT_TYPE,
|
|
||||||
StateServiceAbstraction,
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: I18nServiceAbstraction,
|
provide: I18nServiceAbstraction,
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { ClientType, DeviceType } from "@bitwarden/common/enums";
|
|||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.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 { BiometricMessage, BiometricStorageAction } from "../../types/biometric-message";
|
||||||
import { isDev, isMacAppStore } from "../../utils";
|
import { isDev, isMacAppStore } from "../../utils";
|
||||||
@@ -12,12 +11,7 @@ import { isDev, isMacAppStore } from "../../utils";
|
|||||||
export class ElectronPlatformUtilsService implements PlatformUtilsService {
|
export class ElectronPlatformUtilsService implements PlatformUtilsService {
|
||||||
private deviceCache: DeviceType = null;
|
private deviceCache: DeviceType = null;
|
||||||
|
|
||||||
constructor(
|
constructor(protected i18nService: I18nService, private messagingService: MessagingService) {}
|
||||||
protected i18nService: I18nService,
|
|
||||||
private messagingService: MessagingService,
|
|
||||||
private clientType: ClientType.Desktop | ClientType.DirectoryConnector,
|
|
||||||
private stateService: StateService
|
|
||||||
) {}
|
|
||||||
|
|
||||||
getDevice(): DeviceType {
|
getDevice(): DeviceType {
|
||||||
if (!this.deviceCache) {
|
if (!this.deviceCache) {
|
||||||
@@ -44,7 +38,7 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getClientType() {
|
getClientType() {
|
||||||
return this.clientType;
|
return ClientType.Desktop;
|
||||||
}
|
}
|
||||||
|
|
||||||
isFirefox(): boolean {
|
isFirefox(): boolean {
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ export const LOGOUT_CALLBACK = new InjectionToken<
|
|||||||
export const LOCKED_CALLBACK = new InjectionToken<(userId?: string) => Promise<void>>(
|
export const LOCKED_CALLBACK = new InjectionToken<(userId?: string) => Promise<void>>(
|
||||||
"LOCKED_CALLBACK"
|
"LOCKED_CALLBACK"
|
||||||
);
|
);
|
||||||
export const CLIENT_TYPE = new InjectionToken<boolean>("CLIENT_TYPE");
|
|
||||||
export const LOCALES_DIRECTORY = new InjectionToken<string>("LOCALES_DIRECTORY");
|
export const LOCALES_DIRECTORY = new InjectionToken<string>("LOCALES_DIRECTORY");
|
||||||
export const SYSTEM_LANGUAGE = new InjectionToken<string>("SYSTEM_LANGUAGE");
|
export const SYSTEM_LANGUAGE = new InjectionToken<string>("SYSTEM_LANGUAGE");
|
||||||
export const LOG_MAC_FAILURES = new InjectionToken<string>("LOG_MAC_FAILURES");
|
export const LOG_MAC_FAILURES = new InjectionToken<string>("LOG_MAC_FAILURES");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ export enum ClientType {
|
|||||||
Web = "web",
|
Web = "web",
|
||||||
Browser = "browser",
|
Browser = "browser",
|
||||||
Desktop = "desktop",
|
Desktop = "desktop",
|
||||||
Mobile = "mobile",
|
// Mobile = "mobile",
|
||||||
Cli = "cli",
|
Cli = "cli",
|
||||||
DirectoryConnector = "connector",
|
// DirectoryConnector = "connector",
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user