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

Use theme enum and platformUtilsService helpers (#2089)

* Use theme enum and platformUtilsService helpers

* Update jslib
This commit is contained in:
Thomas Rittson
2021-10-05 06:30:31 +10:00
committed by GitHub
parent e4260e7df5
commit 6dfb06c5b0
6 changed files with 46 additions and 29 deletions

View File

@@ -146,7 +146,8 @@ export default class MainBackground {
constructor() {
// Services
this.messagingService = new BrowserMessagingService();
this.platformUtilsService = new BrowserPlatformUtilsService(this.messagingService,
this.storageService = new BrowserStorageService();
this.platformUtilsService = new BrowserPlatformUtilsService(this.messagingService, this.storageService,
(clipboardValue, clearMs) => {
if (this.systemService != null) {
this.systemService.clearClipboard(clipboardValue, clearMs);
@@ -165,7 +166,6 @@ export default class MainBackground {
return promise.then(result => result.response === 'unlocked');
}
});
this.storageService = new BrowserStorageService();
this.secureStorageService = new BrowserStorageService();
this.i18nService = new I18nService(BrowserApi.getUILanguage(window));
this.cryptoFunctionService = new WebCryptoFunctionService(window, this.platformUtilsService);