diff options
Diffstat (limited to 'ext/js/pages/settings/settings-display-controller.js')
-rw-r--r-- | ext/js/pages/settings/settings-display-controller.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/js/pages/settings/settings-display-controller.js b/ext/js/pages/settings/settings-display-controller.js index e179b835..a2150a15 100644 --- a/ext/js/pages/settings/settings-display-controller.js +++ b/ext/js/pages/settings/settings-display-controller.js @@ -47,9 +47,9 @@ export class SettingsDisplayController { } /** */ - prepare() { + async prepare() { this._themeController.prepare(); - void this._updateTheme(); + await this._setTheme(); const onFabButtonClick = this._onFabButtonClick.bind(this); for (const fabButton of /** @type {NodeListOf<HTMLElement>} */ (document.querySelectorAll('.fab-button'))) { @@ -99,6 +99,13 @@ export class SettingsDisplayController { } /** */ + async _setTheme() { + this._themeController.theme = (await this._settingsController.getOptions()).general.popupTheme; + this._themeController.siteOverride = true; + this._themeController.updateTheme(); + } + + /** */ async _updateTheme() { const theme = this._themeDropdown?.value; if (theme === 'site' || theme === 'light' || theme === 'dark' || theme === 'browser') { |