diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-10-10 20:58:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-10 20:58:38 -0400 |
commit | 25c590e54b3086558c10765a4df6f1ddea00fc54 (patch) | |
tree | 6b87a8b7c319fa201d353c9a8df321dab784e643 /ext/bg/js/settings/main.js | |
parent | 0244d07ea9afc0a7893c1ba448ec284e95a55073 (diff) |
Add modal controller class (#908)
* Add ModalController
* Use modalController instead of new Modal
Diffstat (limited to 'ext/bg/js/settings/main.js')
-rw-r--r-- | ext/bg/js/settings/main.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index 37c6375d..3b2ff29d 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -24,6 +24,7 @@ * DictionaryController * DictionaryImportController * GenericSettingController + * ModalController * PopupPreviewController * ProfileController * ScanInputsController @@ -57,6 +58,9 @@ async function setupEnvironmentInfo() { const optionsFull = await api.optionsGetFull(); + const modalController = new ModalController(); + modalController.prepare(); + const settingsController = new SettingsController(optionsFull.profileCurrent); settingsController.prepare(); @@ -75,22 +79,22 @@ async function setupEnvironmentInfo() { const audioController = new AudioController(settingsController); audioController.prepare(); - const profileController = new ProfileController(settingsController); + const profileController = new ProfileController(settingsController, modalController); profileController.prepare(); - const dictionaryController = new DictionaryController(settingsController); + const dictionaryController = new DictionaryController(settingsController, modalController); dictionaryController.prepare(); - const dictionaryImportController = new DictionaryImportController(settingsController, storageController); + const dictionaryImportController = new DictionaryImportController(settingsController, modalController, storageController); dictionaryImportController.prepare(); const ankiController = new AnkiController(settingsController); ankiController.prepare(); - const ankiTemplatesController = new AnkiTemplatesController(settingsController, ankiController); + const ankiTemplatesController = new AnkiTemplatesController(settingsController, modalController, ankiController); ankiTemplatesController.prepare(); - const settingsBackup = new BackupController(settingsController); + const settingsBackup = new BackupController(settingsController, modalController); settingsBackup.prepare(); const scanInputsController = new ScanInputsController(settingsController); |