1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-11 22:13:32 +00:00

Rebase: Start Implementing AccountService

This commit is contained in:
Justin Baur
2023-10-02 16:54:35 -04:00
parent 39574fe6e4
commit 33c8d55f0d
18 changed files with 286 additions and 225 deletions

View File

@@ -2,6 +2,7 @@ import * as path from "path";
import { app } from "electron";
import { AccountServiceImplementation } from "@bitwarden/common/auth/services/account.service";
import { StateFactory } from "@bitwarden/common/platform/factories/state-factory";
import { GlobalState } from "@bitwarden/common/platform/models/domain/global-state";
import { MemoryStorageService } from "@bitwarden/common/platform/services/memory-storage.service";
@@ -28,6 +29,7 @@ export class Main {
storageService: ElectronStorageService;
memoryStorageService: MemoryStorageService;
messagingService: ElectronMainMessagingService;
accountService: AccountServiceImplementation;
stateService: ElectronStateService;
desktopCredentialStorageListener: DesktopCredentialStorageListener;
@@ -91,6 +93,7 @@ export class Main {
this.memoryStorageService,
this.logService,
new StateFactory(GlobalState, Account),
this.accountService, // TODO: This is circular
false // Do not use disk caching because this will get out of sync with the renderer service
);
@@ -108,6 +111,9 @@ export class Main {
this.messagingService = new ElectronMainMessagingService(this.windowMain, (message) => {
this.messagingMain.onMessage(message);
});
this.accountService = new AccountServiceImplementation(this.messagingService, this.logService);
this.powerMonitorMain = new PowerMonitorMain(this.messagingService);
this.menuMain = new MenuMain(
this.i18nService,