diff --git a/web_server.py b/web_server.py
index f965741f..50a9d97f 100644
--- a/web_server.py
+++ b/web_server.py
@@ -363,6 +363,9 @@ def _initial_appearance_context():
preset = config_manager.get('ui_appearance.accent_preset', '#1db954')
custom = config_manager.get('ui_appearance.accent_color', '#1db954')
accent = _valid_hex_color(custom if preset == 'custom' else preset)
+ particles_enabled = config_manager.get('ui_appearance.particles_enabled', False) is True
+ worker_orbs_enabled = config_manager.get('ui_appearance.worker_orbs_enabled', True) is not False
+ reduce_effects = config_manager.get('ui_appearance.reduce_effects', False) is True
r, g, b = _hex_to_rgb(accent)
hue, saturation, lightness = _rgb_to_hsl(r, g, b)
light = _hsl_to_rgb(hue, saturation, min(lightness + 0.16, 0.95))
@@ -372,6 +375,9 @@ def _initial_appearance_context():
'initial_accent_rgb': f'{r}, {g}, {b}',
'initial_accent_light_rgb': f'{light[0]}, {light[1]}, {light[2]}',
'initial_accent_neon_rgb': f'{neon[0]}, {neon[1]}, {neon[2]}',
+ 'initial_particles_enabled': particles_enabled,
+ 'initial_worker_orbs_enabled': worker_orbs_enabled,
+ 'initial_reduce_effects': reduce_effects,
}
diff --git a/webui/index.html b/webui/index.html
index 20166043..792ac608 100644
--- a/webui/index.html
+++ b/webui/index.html
@@ -20,10 +20,15 @@
--accent-neon-rgb: {{ initial_accent_neon_rgb }};
}
+
{{ vite_assets('head')|safe }}
-
+
@@ -354,7 +359,7 @@
-
+
diff --git a/webui/static/init.js b/webui/static/init.js
index ca73baba..0b49db46 100644
--- a/webui/static/init.js
+++ b/webui/static/init.js
@@ -254,16 +254,28 @@ function applyReduceEffects(enabled) {
}
}
- if (localStorage.getItem('soulsync-reduce-effects') === '1') {
+ const reduceEffectsSaved = localStorage.getItem('soulsync-reduce-effects');
+ if (reduceEffectsSaved === '1') {
document.body.classList.add('reduce-effects');
window._reduceEffectsActive = true;
+ } else if (reduceEffectsSaved === '0') {
+ document.body.classList.remove('reduce-effects');
+ window._reduceEffectsActive = false;
+ } else if (window._reduceEffectsActive) {
+ document.body.classList.add('reduce-effects');
}
const saved = localStorage.getItem('soulsync-accent');
if (saved) applyAccentColor(saved);
// Bootstrap particles setting from localStorage — OFF by default (continuous
// full-page canvas = real GPU cost); only on when the user explicitly enabled it.
const particlesSaved = localStorage.getItem('soulsync-particles');
- window._particlesEnabled = (particlesSaved === 'true');
+ if (particlesSaved === 'true') {
+ window._particlesEnabled = true;
+ } else if (particlesSaved === 'false') {
+ window._particlesEnabled = false;
+ } else if (typeof window._particlesEnabled !== 'boolean') {
+ window._particlesEnabled = false;
+ }
if (!window._particlesEnabled) {
const canvas = document.getElementById('page-particles-canvas');
if (canvas) canvas.style.display = 'none';
@@ -272,6 +284,10 @@ function applyReduceEffects(enabled) {
const workerOrbsSaved = localStorage.getItem('soulsync-worker-orbs');
if (workerOrbsSaved === 'false') {
window._workerOrbsEnabled = false;
+ } else if (workerOrbsSaved === 'true') {
+ window._workerOrbsEnabled = true;
+ } else if (typeof window._workerOrbsEnabled !== 'boolean') {
+ window._workerOrbsEnabled = true;
}
})();