summaryrefslogtreecommitdiff
path: root/js/App.js
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2025-08-01 17:20:05 +0300
committerAndrew Dolgov <fox@fakecake.org>2025-08-01 17:22:21 +0300
commit8eb340c3ca9f30e48d8019f16d3b2a4385881192 (patch)
tree1e798aae0960cf292d0253e781c5c432b3dfae38 /js/App.js
parent851ddf4bbe750e30816b6c494165e9860bd39b92 (diff)
make default light/dark themes configurable, add support for main application and login form
Diffstat (limited to 'js/App.js')
-rw-r--r--js/App.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/App.js b/js/App.js
index 5c4be5ea0..1ac3a43f0 100644
--- a/js/App.js
+++ b/js/App.js
@@ -173,7 +173,7 @@ const App = {
if (link) {
if (navigator.onLine) {
- const css_override = is_night ? "themes/night.css" : "themes/light.css";
+ const css_override = is_night ? App.getInitParam("default_dark_theme") : App.getInitParam("default_light_theme");
link.setAttribute("href", css_override + "?" + Date.now());
} else if (retry < 5) {
console.log("nightModeChanged: we're offline, will attempt to retry...");
@@ -704,6 +704,8 @@ const App = {
window.onerror = this.Error.onWindowError;
this.setInitParam("csrf_token", __csrf_token);
+ this.setInitParam("default_light_theme", __default_light_theme);
+ this.setInitParam("default_dark_theme", __default_dark_theme);
this.setupNightModeDetection(() => {
parser.parse();