refactor: import modal

This commit is contained in:
Aman Harwara
2023-04-18 16:42:42 +05:30
parent 4182cebf6a
commit 877d46d8eb
8 changed files with 232 additions and 257 deletions

View File

@@ -40,6 +40,7 @@ import { PersistenceService } from './Abstract/PersistenceService'
import { CrossControllerEvent } from './CrossControllerEvent'
import { EventObserverInterface } from '@/Event/EventObserverInterface'
import { ApplicationEventObserver } from '@/Event/ApplicationEventObserver'
import { ImportModalController } from './ImportModalController'
export class ViewControllerManager implements InternalEventHandlerInterface {
readonly enableUnfinishedFeatures: boolean = window?.enabledUnfinishedFeatures
@@ -67,9 +68,9 @@ export class ViewControllerManager implements InternalEventHandlerInterface {
readonly historyModalController: HistoryModalController
readonly linkingController: LinkingController
readonly paneController: PaneController
readonly importModalController: ImportModalController
public isSessionsModalVisible = false
public isImportModalVisible = observable.box(false)
private appEventObserverRemovers: (() => void)[] = []
private eventBus: InternalEventBus
@@ -154,6 +155,8 @@ export class ViewControllerManager implements InternalEventHandlerInterface {
this.historyModalController = new HistoryModalController(this.application, this.eventBus, this.notesController)
this.importModalController = new ImportModalController(this.application, this.navigationController)
this.toastService = new ToastService()
this.applicationEventObserver = new ApplicationEventObserver(