summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/backup-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/settings/backup-controller.js')
-rw-r--r--ext/bg/js/settings/backup-controller.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/bg/js/settings/backup-controller.js b/ext/bg/js/settings/backup-controller.js
index 80f83eb7..50390d5c 100644
--- a/ext/bg/js/settings/backup-controller.js
+++ b/ext/bg/js/settings/backup-controller.js
@@ -22,8 +22,9 @@
*/
class BackupController {
- constructor(settingsController) {
+ constructor(settingsController, modalController) {
this._settingsController = settingsController;
+ this._modalController = modalController;
this._settingsExportToken = null;
this._settingsExportRevoke = null;
this._currentVersion = 0;
@@ -36,9 +37,9 @@ class BackupController {
async prepare() {
await this._optionsUtil.prepare();
- this._settingsResetModal = new Modal(document.querySelector('#settings-reset-modal'));
- this._settingsImportErrorModal = new Modal(document.querySelector('#settings-import-error-modal'));
- this._settingsImportWarningModal = new Modal(document.querySelector('#settings-import-warning-modal'));
+ this._settingsResetModal = this._modalController.getModal('settings-reset-modal');
+ this._settingsImportErrorModal = this._modalController.getModal('settings-import-error-modal');
+ this._settingsImportWarningModal = this._modalController.getModal('settings-import-warning-modal');
document.querySelector('#settings-export').addEventListener('click', this._onSettingsExportClick.bind(this), false);
document.querySelector('#settings-import').addEventListener('click', this._onSettingsImportClick.bind(this), false);