1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

move to base menu and keytar storage from jslib

This commit is contained in:
Kyle Spearrin
2018-04-25 15:43:26 -04:00
parent b87f648eeb
commit 8239c0cc53
4 changed files with 23 additions and 269 deletions

View File

@@ -11,6 +11,7 @@ import { UpdaterMain } from './main/updater.main';
import { ConstantsService } from 'jslib/services/constants.service';
import { KeytarStorageListener } from 'jslib/electron/keytarStorageListener';
import { ElectronLogService } from 'jslib/electron/services/electronLog.service';
import { ElectronStorageService } from 'jslib/electron/services/electronStorage.service';
import { WindowMain } from 'jslib/electron/window.main';
@@ -20,6 +21,7 @@ export class Main {
i18nService: I18nService;
storageService: ElectronStorageService;
messagingService: DesktopMainMessagingService;
keytarStorageListener: KeytarStorageListener;
windowMain: WindowMain;
messagingMain: MessagingMain;
@@ -61,9 +63,12 @@ export class Main {
this.updaterMain = new UpdaterMain(this);
this.menuMain = new MenuMain(this);
this.powerMonitorMain = new PowerMonitorMain(this);
this.keytarStorageListener = new KeytarStorageListener('Bitwarden');
}
bootstrap() {
this.keytarStorageListener.init();
this.windowMain.init().then(async () => {
const locale = await this.storageService.get<string>(ConstantsService.localeKey);
await this.i18nService.init(locale != null ? locale : app.getLocale());