summaryrefslogtreecommitdiff
path: root/ext/js/pages/action-popup-main.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/pages/action-popup-main.js')
-rw-r--r--ext/js/pages/action-popup-main.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/js/pages/action-popup-main.js b/ext/js/pages/action-popup-main.js
index cdf8f328..ce29bcf1 100644
--- a/ext/js/pages/action-popup-main.js
+++ b/ext/js/pages/action-popup-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 {getAllPermissions, hasRequiredPermissionsForOptions} from '../data/permissions-util.js';
import {querySelectorNotNull} from '../dom/query-selector.js';
@@ -30,10 +31,15 @@ class DisplayController {
this._api = api;
/** @type {?import('settings').Options} */
this._optionsFull = null;
+ /** @type {ThemeController} */
+ this._themeController = new ThemeController(document.documentElement);
}
/** */
async prepare() {
+ this._themeController.siteTheme = 'light';
+ this._themeController.prepare();
+
const manifest = chrome.runtime.getManifest();
this._showExtensionInfo(manifest);
@@ -201,6 +207,9 @@ class DisplayController {
}
void this._updateDictionariesEnabledWarnings(options);
void this._updatePermissionsWarnings(options);
+
+ this._themeController.theme = options.general.popupTheme;
+ this._themeController.updateTheme();
}
/** */