feat: replace animations toggle with display mode selector in settings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
James Smith
2026-05-19 22:22:05 +01:00
parent 95776f5519
commit 0a75322ad1
2 changed files with 13 additions and 18 deletions
+7 -12
View File
@@ -705,10 +705,9 @@ const Settings = {
themeSelect.value = localStorage.getItem('intercept-theme') || 'dark';
}
// Animations toggle
const animationsEnabled = document.getElementById('animationsEnabled');
if (animationsEnabled) {
animationsEnabled.checked = localStorage.getItem('intercept-animations') !== 'off';
const uiTierSelect = document.getElementById('uiTierSelect');
if (uiTierSelect) {
uiTierSelect.value = localStorage.getItem('intercept-ui-tier') || 'enhanced';
}
},
@@ -1486,15 +1485,11 @@ function setThemePreference(value) {
}
/**
* Set animations preference from the Display settings tab
* Set UI tier preference from the Display settings tab
*/
function setAnimationsEnabled(enabled) {
if (enabled) {
document.documentElement.removeAttribute('data-animations');
} else {
document.documentElement.setAttribute('data-animations', 'off');
}
localStorage.setItem('intercept-animations', enabled ? 'on' : 'off');
function setUiTierPreference(tier) {
document.documentElement.setAttribute('data-ui-tier', tier);
localStorage.setItem('intercept-ui-tier', tier);
}
if (!window._settingsEscapeHandlerBound) {
+6 -6
View File
@@ -218,13 +218,13 @@
<div class="settings-row">
<div class="settings-label">
<span class="settings-label-text">Animations</span>
<span class="settings-label-desc">Enable visual effects and animations</span>
<span class="settings-label-text">Display Mode</span>
<span class="settings-label-desc">Lean — no effects (Pi / older hardware) · Enhanced — amber military console</span>
</div>
<label class="toggle-switch">
<input type="checkbox" id="animationsEnabled" checked onchange="setAnimationsEnabled(this.checked)">
<span class="toggle-slider"></span>
</label>
<select id="uiTierSelect" class="settings-select" onchange="setUiTierPreference(this.value)">
<option value="enhanced">Enhanced</option>
<option value="lean">Lean</option>
</select>
</div>
</div>