aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/welcome-main.js
diff options
context:
space:
mode:
authorKuuuube <61125188+Kuuuube@users.noreply.github.com>2024-06-19 12:57:21 -0400
committerGitHub <noreply@github.com>2024-06-19 16:57:21 +0000
commitd9521c58bf9b9fef0c8b1248bf6ce8c69351fc16 (patch)
treed21a6833422d87f0c0e4b83d2dbbd1dae092dd24 /ext/js/pages/welcome-main.js
parent451bcab01fd591ec54b63af0fc7084dc9f37928b (diff)
Remove flickering on page loads, reduce flashbangs, fix settings and popup themes applying correctly (#1088)
* Pull theme from settings on page load * Make dark mode default * Fix flickering on load * Invert shadow for auto shadow theme * Revert "Make dark mode default" This reverts commit 4cdfc39686a9faa3ce7a620be23025f97816f5f9. * Improve page load times * Fix flicker on load for popup preview without breaking theming when auto is selected * Revert shadow invert
Diffstat (limited to 'ext/js/pages/welcome-main.js')
-rw-r--r--ext/js/pages/welcome-main.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/ext/js/pages/welcome-main.js b/ext/js/pages/welcome-main.js
index 56a7e7d8..6771b31e 100644
--- a/ext/js/pages/welcome-main.js
+++ b/ext/js/pages/welcome-main.js
@@ -58,6 +58,17 @@ async function checkNeedsCustomTemplatesWarning() {
}
await Application.main(true, async (application) => {
+ const modalController = new ModalController();
+ modalController.prepare();
+
+ const settingsController = new SettingsController(application);
+ await settingsController.prepare();
+
+ const settingsDisplayController = new SettingsDisplayController(settingsController, modalController);
+ await settingsDisplayController.prepare();
+
+ document.body.hidden = false;
+
const documentFocusController = new DocumentFocusController();
documentFocusController.prepare();
@@ -74,12 +85,6 @@ await Application.main(true, async (application) => {
const preparePromises = [];
- const modalController = new ModalController();
- modalController.prepare();
-
- const settingsController = new SettingsController(application);
- await settingsController.prepare();
-
const genericSettingController = new GenericSettingController(settingsController);
preparePromises.push(setupGenericSettingsController(genericSettingController));
@@ -92,9 +97,6 @@ await Application.main(true, async (application) => {
const languagesController = new LanguagesController(settingsController);
preparePromises.push(languagesController.prepare());
- const settingsDisplayController = new SettingsDisplayController(settingsController, modalController);
- settingsDisplayController.prepare();
-
await Promise.all(preparePromises);
document.documentElement.dataset.loaded = 'true';