summaryrefslogtreecommitdiff
path: root/ext/js/pages/settings
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-10 23:12:01 -0500
committerGitHub <noreply@github.com>2024-02-11 04:12:01 +0000
commit765f1ede668f70e3af7717bf4d5f05dbf009c7f8 (patch)
treee73f481c93f8bbaa42f7c8216190fb1cb4621301 /ext/js/pages/settings
parent805cf9cb3ea744a6d7c0a5da27fc9ef4e6f08626 (diff)
Eslint rule updates (#665)
* Padding newline rules * Update rules * Update rules * Update rules * Updates * Update object quotes * Merge similar ts and js rules * Change export spacing rules * Move typescript-eslint rules * Spacing * Actually save and commit changes
Diffstat (limited to 'ext/js/pages/settings')
-rw-r--r--ext/js/pages/settings/backup-controller.js12
-rw-r--r--ext/js/pages/settings/profile-controller.js3
2 files changed, 10 insertions, 5 deletions
diff --git a/ext/js/pages/settings/backup-controller.js b/ext/js/pages/settings/backup-controller.js
index 79733c4d..59bcaed9 100644
--- a/ext/js/pages/settings/backup-controller.js
+++ b/ext/js/pages/settings/backup-controller.js
@@ -579,7 +579,9 @@ export class BackupController {
*/
async _exportDatabase(databaseName) {
const db = await new Dexie(databaseName).open();
- const blob = await db.export({progressCallback: this._databaseExportProgressCallback});
+ const blob = await db.export({
+ progressCallback: this._databaseExportProgressCallback.bind(this)
+ });
await db.close();
return blob;
}
@@ -639,12 +641,14 @@ export class BackupController {
}
/**
- * @param {string} databaseName
+ * @param {string} _databaseName
* @param {File} file
*/
- async _importDatabase(databaseName, file) {
+ async _importDatabase(_databaseName, file) {
await this._settingsController.application.api.purgeDatabase();
- await Dexie.import(file, {progressCallback: this._databaseImportProgressCallback});
+ await Dexie.import(file, {
+ progressCallback: this._databaseImportProgressCallback.bind(this)
+ });
this._settingsController.application.api.triggerDatabaseUpdated('dictionary', 'import');
this._settingsController.application.triggerStorageChanged();
}
diff --git a/ext/js/pages/settings/profile-controller.js b/ext/js/pages/settings/profile-controller.js
index c5ccbe7d..5a7b5ed4 100644
--- a/ext/js/pages/settings/profile-controller.js
+++ b/ext/js/pages/settings/profile-controller.js
@@ -549,7 +549,8 @@ export class ProfileController {
Number.isFinite(intValue) &&
intValue >= 0 &&
intValue < this.profileCount ?
- intValue : null
+ intValue :
+ null
);
}