diff options
Diffstat (limited to 'ext/js/pages/settings/backup-controller.js')
-rw-r--r-- | ext/js/pages/settings/backup-controller.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/js/pages/settings/backup-controller.js b/ext/js/pages/settings/backup-controller.js index f2eccd1e..053cc96b 100644 --- a/ext/js/pages/settings/backup-controller.js +++ b/ext/js/pages/settings/backup-controller.js @@ -22,7 +22,8 @@ import {log} from '../../core/logger.js'; import {toError} from '../../core/to-error.js'; import {isObject} from '../../core/utilities.js'; import {OptionsUtil} from '../../data/options-util.js'; -import {ArrayBufferUtil} from '../../data/sandbox/array-buffer-util.js'; +import {getAllPermissions} from '../../data/permissions-util.js'; +import {arrayBufferUtf8Decode} from '../../data/sandbox/array-buffer-util.js'; import {querySelectorNotNull} from '../../dom/query-selector.js'; import {yomitan} from '../../yomitan.js'; import {DictionaryController} from './dictionary-controller.js'; @@ -135,7 +136,7 @@ export class BackupController { const optionsFull = await this._settingsController.getOptionsFull(); const environment = await yomitan.api.getEnvironmentInfo(); const fieldTemplatesDefault = await yomitan.api.getDefaultAnkiFieldTemplates(); - const permissions = await this._settingsController.permissionsUtil.getAllPermissions(); + const permissions = await getAllPermissions(); // Format options for (const {options} of optionsFull.profiles) { @@ -425,7 +426,7 @@ export class BackupController { async _importSettingsFile(file) { if (this._optionsUtil === null) { throw new Error('OptionsUtil invalid'); } - const dataString = ArrayBufferUtil.arrayBufferUtf8Decode(await this._readFileArrayBuffer(file)); + const dataString = arrayBufferUtf8Decode(await this._readFileArrayBuffer(file)); /** @type {import('backup-controller').BackupData} */ const data = parseJson(dataString); |