diff --git a/ext/css/settings.css b/ext/css/settings.css index c70e8f9b74..7e6c4bc158 100644 --- a/ext/css/settings.css +++ b/ext/css/settings.css @@ -754,12 +754,6 @@ select.short-height { color: #8b0000; } -/* Recommended settings modal */ -/* #recommended-settings-body { - display: grid; - grid-template-columns: auto 1fr; -} */ - /* Advanced settings */ .settings-group.advanced-only>.settings-item::after, diff --git a/ext/js/pages/settings/languages-controller.js b/ext/js/pages/settings/languages-controller.js index aa917737b9..707230bef4 100755 --- a/ext/js/pages/settings/languages-controller.js +++ b/ext/js/pages/settings/languages-controller.js @@ -25,17 +25,13 @@ export class LanguagesController { constructor(settingsController) { /** @type {import('./settings-controller.js').SettingsController} */ this._settingsController = settingsController; - /** @type {string} */ - this._lastSelectedLanguage = ''; - /** @type {import('language').LanguageSummary[]} */ - this._languages = []; } /** */ async prepare() { - this._languages = await this._settingsController.application.api.getLanguageSummaries(); - this._languages.sort((a, b) => a.name.localeCompare(b.name, 'en')); - this._fillSelect(this._languages); + const languages = await this._settingsController.application.api.getLanguageSummaries(); + languages.sort((a, b) => a.name.localeCompare(b.name, 'en')); + this._fillSelect(languages); } /** diff --git a/ext/js/pages/settings/recommended-settings-controller.js b/ext/js/pages/settings/recommended-settings-controller.js index 079bf45636..d4f2683b42 100644 --- a/ext/js/pages/settings/recommended-settings-controller.js +++ b/ext/js/pages/settings/recommended-settings-controller.js @@ -69,7 +69,8 @@ export class RecommendedSettingsController { } // Render checkbox - const checkbox /** @type {HTMLInputElement} */ = querySelectorNotNull(template, 'input[type="checkbox"]'); + /** @type {HTMLInputElement} */ + const checkbox = querySelectorNotNull(template, 'input[type="checkbox"]'); checkbox.value = path; settingsList.append(template); @@ -83,7 +84,8 @@ export class RecommendedSettingsController { */ _onApplyButtonClicked(e) { e.preventDefault(); - const enabledCheckboxes /** @type {HTMLInputElement} */ = querySelectorNotNull(document, '#recommended-settings-list').querySelectorAll('input[type="checkbox"]:checked'); + /** @type {HTMLInputElement[]} */ + const enabledCheckboxes = querySelectorNotNull(document, '#recommended-settings-list').querySelectorAll('input[type="checkbox"]:checked'); if (enabledCheckboxes.length > 0) { const recommendedSettings = this._settingsController.getRecommendedSettings(this._languageSelect.value); const modifications = []; diff --git a/ext/js/pages/settings/settings-controller.js b/ext/js/pages/settings/settings-controller.js index c54e899212..ca55c2b0ee 100644 --- a/ext/js/pages/settings/settings-controller.js +++ b/ext/js/pages/settings/settings-controller.js @@ -186,19 +186,6 @@ export class SettingsController extends EventDispatcher { return await this.modifyProfileSettings([{action: 'set', path, value}]); } - /** - * @param {string} language - */ - async applyLanguageSettingOverrides(language) { - /** @type {import('settings-controller').RecommendedSetting[]} */ - const settingOverrides = this._recommendedSettingsByLanguage[language]; - if (typeof settingOverrides === 'undefined') { return; } - /** @type {import('settings-modifications').Modification[]} */ - const modifications = settingOverrides.map(({path, value}) => ({action: 'set', path, value})); - await this.modifyProfileSettings(modifications); - await this._onOptionsUpdatedInternal(true); - } - /** * @param {string} language * @returns {import('settings-controller').RecommendedSetting[]} diff --git a/ext/settings.html b/ext/settings.html index 0053c411e7..cffffc8f38 100644 --- a/ext/settings.html +++ b/ext/settings.html @@ -2366,5 +2366,6 @@