From 8408bee90a0a78a77e7c5834e633a0387f9f434c Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 9 Sep 2020 17:37:58 -0400 Subject: [PATCH] Settings controller file renaming (#794) * Rename SettingsBackup to BackupController * Rename files to more closely match classes * Improve organization of script imports --- .../settings/{anki.js => anki-controller.js} | 0 ...plates.js => anki-templates-controller.js} | 0 .../{audio.js => audio-controller.js} | 0 .../{backup.js => backup-controller.js} | 2 +- ...ctionaries.js => dictionary-controller.js} | 0 ext/bg/js/settings/main.js | 4 +- ...preview.js => popup-preview-controller.js} | 0 .../{profiles.js => profile-controller.js} | 0 .../{storage.js => storage-controller.js} | 0 ext/bg/settings.html | 37 ++++++++++--------- 10 files changed, 22 insertions(+), 21 deletions(-) rename ext/bg/js/settings/{anki.js => anki-controller.js} (100%) rename ext/bg/js/settings/{anki-templates.js => anki-templates-controller.js} (100%) rename ext/bg/js/settings/{audio.js => audio-controller.js} (100%) rename ext/bg/js/settings/{backup.js => backup-controller.js} (99%) rename ext/bg/js/settings/{dictionaries.js => dictionary-controller.js} (100%) rename ext/bg/js/settings/{popup-preview.js => popup-preview-controller.js} (100%) rename ext/bg/js/settings/{profiles.js => profile-controller.js} (100%) rename ext/bg/js/settings/{storage.js => storage-controller.js} (100%) diff --git a/ext/bg/js/settings/anki.js b/ext/bg/js/settings/anki-controller.js similarity index 100% rename from ext/bg/js/settings/anki.js rename to ext/bg/js/settings/anki-controller.js diff --git a/ext/bg/js/settings/anki-templates.js b/ext/bg/js/settings/anki-templates-controller.js similarity index 100% rename from ext/bg/js/settings/anki-templates.js rename to ext/bg/js/settings/anki-templates-controller.js diff --git a/ext/bg/js/settings/audio.js b/ext/bg/js/settings/audio-controller.js similarity index 100% rename from ext/bg/js/settings/audio.js rename to ext/bg/js/settings/audio-controller.js diff --git a/ext/bg/js/settings/backup.js b/ext/bg/js/settings/backup-controller.js similarity index 99% rename from ext/bg/js/settings/backup.js rename to ext/bg/js/settings/backup-controller.js index 57963cec..ac1294e7 100644 --- a/ext/bg/js/settings/backup.js +++ b/ext/bg/js/settings/backup-controller.js @@ -20,7 +20,7 @@ * api */ -class SettingsBackup { +class BackupController { constructor(settingsController) { this._settingsController = settingsController; this._settingsExportToken = null; diff --git a/ext/bg/js/settings/dictionaries.js b/ext/bg/js/settings/dictionary-controller.js similarity index 100% rename from ext/bg/js/settings/dictionaries.js rename to ext/bg/js/settings/dictionary-controller.js diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index 4932586b..37c6375d 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -19,6 +19,7 @@ * AnkiController * AnkiTemplatesController * AudioController + * BackupController * ClipboardPopupsController * DictionaryController * DictionaryImportController @@ -26,7 +27,6 @@ * PopupPreviewController * ProfileController * ScanInputsController - * SettingsBackup * SettingsController * StorageController * api @@ -90,7 +90,7 @@ async function setupEnvironmentInfo() { const ankiTemplatesController = new AnkiTemplatesController(settingsController, ankiController); ankiTemplatesController.prepare(); - const settingsBackup = new SettingsBackup(settingsController); + const settingsBackup = new BackupController(settingsController); settingsBackup.prepare(); const scanInputsController = new ScanInputsController(settingsController); diff --git a/ext/bg/js/settings/popup-preview.js b/ext/bg/js/settings/popup-preview-controller.js similarity index 100% rename from ext/bg/js/settings/popup-preview.js rename to ext/bg/js/settings/popup-preview-controller.js diff --git a/ext/bg/js/settings/profiles.js b/ext/bg/js/settings/profile-controller.js similarity index 100% rename from ext/bg/js/settings/profiles.js rename to ext/bg/js/settings/profile-controller.js diff --git a/ext/bg/js/settings/storage.js b/ext/bg/js/settings/storage-controller.js similarity index 100% rename from ext/bg/js/settings/storage.js rename to ext/bg/js/settings/storage-controller.js diff --git a/ext/bg/settings.html b/ext/bg/settings.html index ae89ca1f..b01fbf73 100644 --- a/ext/bg/settings.html +++ b/ext/bg/settings.html @@ -1165,39 +1165,40 @@ + + + + + + + + - - - - - - - - + + + + + + + - + - - - - + + - - - - - +