mirror of
https://github.com/bitwarden/browser.git
synced 2024-08-21 22:23:52 +02:00
Add support for helpers in environment service (#1002)
* Add support for helpers in environment service * Add environment service to register component * Bump jslib
This commit is contained in:
parent
c863d68057
commit
20561fff87
2
jslib
2
jslib
|
@ -1 +1 @@
|
|||
Subproject commit c77441b35348c821af7fd6261b6dc72732d5ebad
|
||||
Subproject commit e1ce72136490b9055d8d6a03988e9d39ac560a89
|
|
@ -8,6 +8,7 @@ import {
|
|||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||
import { AuthService } from 'jslib-common/abstractions/auth.service';
|
||||
import { CryptoFunctionService } from 'jslib-common/abstractions/cryptoFunction.service';
|
||||
import { EnvironmentService } from 'jslib-common/abstractions/environment.service';
|
||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||
import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service';
|
||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||
|
@ -26,10 +27,10 @@ export class SsoComponent extends BaseSsoComponent {
|
|||
i18nService: I18nService, syncService: SyncService, route: ActivatedRoute,
|
||||
storageService: StorageService, stateService: StateService,
|
||||
platformUtilsService: PlatformUtilsService, apiService: ApiService,
|
||||
cryptoFunctionService: CryptoFunctionService,
|
||||
cryptoFunctionService: CryptoFunctionService, environmentService: EnvironmentService,
|
||||
passwordGenerationService: PasswordGenerationService) {
|
||||
super(authService, router, i18nService, route, storageService, stateService, platformUtilsService,
|
||||
apiService, cryptoFunctionService, passwordGenerationService);
|
||||
apiService, cryptoFunctionService, environmentService, passwordGenerationService);
|
||||
super.onSuccessfulLogin = () => {
|
||||
return syncService.fullSync(true);
|
||||
};
|
||||
|
|
|
@ -101,7 +101,8 @@ const cryptoService = new ElectronCryptoService(storageService, secureStorageSer
|
|||
platformUtilsService, logService);
|
||||
const tokenService = new TokenService(storageService);
|
||||
const appIdService = new AppIdService(storageService);
|
||||
const apiService = new ApiService(tokenService, platformUtilsService,
|
||||
const environmentService = new EnvironmentService(storageService);
|
||||
const apiService = new ApiService(tokenService, platformUtilsService, environmentService,
|
||||
async (expired: boolean) => messagingService.send('logout', { expired: expired }));
|
||||
const userService = new UserService(tokenService, storageService);
|
||||
const settingsService = new SettingsService(userService, storageService);
|
||||
|
@ -130,8 +131,7 @@ const authService = new AuthService(cryptoService, apiService, userService, toke
|
|||
const exportService = new ExportService(folderService, cipherService, apiService, cryptoService);
|
||||
const auditService = new AuditService(cryptoFunctionService, apiService);
|
||||
const notificationsService = new NotificationsService(userService, syncService, appIdService,
|
||||
apiService, vaultTimeoutService, async () => messagingService.send('logout', { expired: true }), logService);
|
||||
const environmentService = new EnvironmentService(apiService, storageService, notificationsService);
|
||||
apiService, vaultTimeoutService, environmentService, async () => messagingService.send('logout', { expired: true }), logService);
|
||||
const eventService = new EventService(storageService, apiService, userService, cipherService);
|
||||
const systemService = new SystemService(storageService, vaultTimeoutService, messagingService, platformUtilsService,
|
||||
null);
|
||||
|
@ -150,7 +150,7 @@ export function initFactory(): Function {
|
|||
await i18nService.init(locale);
|
||||
eventService.init(true);
|
||||
authService.init();
|
||||
setTimeout(() => notificationsService.init(environmentService), 3000);
|
||||
setTimeout(() => notificationsService.init(), 3000);
|
||||
const htmlEl = window.document.documentElement;
|
||||
htmlEl.classList.add('os_' + platformUtilsService.getDeviceString());
|
||||
htmlEl.classList.add('locale_' + i18nService.translationLocale);
|
||||
|
|
Loading…
Reference in New Issue
Block a user