diff options
Diffstat (limited to 'ext/js/pages/info-main.js')
-rw-r--r-- | ext/js/pages/info-main.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/js/pages/info-main.js b/ext/js/pages/info-main.js index c0e37261..f431239f 100644 --- a/ext/js/pages/info-main.js +++ b/ext/js/pages/info-main.js @@ -16,6 +16,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ +import {ThemeController} from '../app/theme-controller.js'; import {Application} from '../application.js'; import {promiseTimeout} from '../core/utilities.js'; import {DocumentFocusController} from '../dom/document-focus-controller.js'; @@ -154,6 +155,17 @@ await Application.main(true, async (application) => { const settingsController = new SettingsController(application); await settingsController.prepare(); + /** @type {ThemeController} */ + const themeController = new ThemeController(document.documentElement); + themeController.prepare(); + const optionsFull = await application.api.optionsGetFull(); + const {profiles, profileCurrent} = optionsFull; + const primaryProfile = (profileCurrent >= 0 && profileCurrent < profiles.length) ? profiles[profileCurrent] : null; + if (primaryProfile !== null) { + themeController.theme = primaryProfile.options.general.popupTheme; + themeController.updateTheme(); + } + const backupController = new BackupController(settingsController, null); await backupController.prepare(); |