mirror of
https://github.com/bitwarden/browser
synced 2026-02-11 22:13:32 +00:00
Use PlatformUtilsService Directly
This commit is contained in:
@@ -45,7 +45,6 @@ export const LOGOUT_CALLBACK = new SafeInjectionToken<
|
||||
export const LOCKED_CALLBACK = new SafeInjectionToken<(userId?: string) => Promise<void>>(
|
||||
"LOCKED_CALLBACK",
|
||||
);
|
||||
export const SUPPORTS_SECURE_STORAGE = new SafeInjectionToken<boolean>("SUPPORTS_SECURE_STORAGE");
|
||||
export const LOCALES_DIRECTORY = new SafeInjectionToken<string>("LOCALES_DIRECTORY");
|
||||
export const SYSTEM_LANGUAGE = new SafeInjectionToken<string>("SYSTEM_LANGUAGE");
|
||||
export const LOG_MAC_FAILURES = new SafeInjectionToken<boolean>("LOG_MAC_FAILURES");
|
||||
|
||||
@@ -319,7 +319,6 @@ import {
|
||||
SafeInjectionToken,
|
||||
SECURE_STORAGE,
|
||||
STATE_FACTORY,
|
||||
SUPPORTS_SECURE_STORAGE,
|
||||
SYSTEM_LANGUAGE,
|
||||
SYSTEM_THEME_OBSERVABLE,
|
||||
WINDOW,
|
||||
@@ -345,12 +344,6 @@ const safeProviders: SafeProvider[] = [
|
||||
useFactory: (i18nService: I18nServiceAbstraction) => i18nService.translationLocale,
|
||||
deps: [I18nServiceAbstraction],
|
||||
}),
|
||||
safeProvider({
|
||||
provide: SUPPORTS_SECURE_STORAGE,
|
||||
useFactory: (platformUtilsService: PlatformUtilsServiceAbstraction) =>
|
||||
platformUtilsService.supportsSecureStorage(),
|
||||
deps: [PlatformUtilsServiceAbstraction],
|
||||
}),
|
||||
safeProvider({
|
||||
provide: LOCALES_DIRECTORY,
|
||||
useValue: "./locales",
|
||||
@@ -589,7 +582,7 @@ const safeProviders: SafeProvider[] = [
|
||||
deps: [
|
||||
SingleUserStateProvider,
|
||||
GlobalStateProvider,
|
||||
SUPPORTS_SECURE_STORAGE,
|
||||
PlatformUtilsServiceAbstraction,
|
||||
SECURE_STORAGE,
|
||||
KeyGenerationServiceAbstraction,
|
||||
EncryptService,
|
||||
|
||||
Reference in New Issue
Block a user