set initial selection instantly

This commit is contained in:
Cory LaViska
2025-06-24 14:33:47 -04:00
parent 4d14d4c5e2
commit 41db67b4f2
2 changed files with 14 additions and 0 deletions

View File

@@ -16,3 +16,10 @@
System
</wa-option>
</wa-select>
<script>
// Immediately set the correct value from storage
document.querySelectorAll('wa-select.color-scheme-selector').forEach(el => {
el.setAttribute('value', localStorage.getItem('color-scheme') || 'auto');
});
</script>

View File

@@ -16,3 +16,10 @@
{% endif %}
{% endfor %}
</wa-select>
<script>
// Immediately set the correct value from storage
document.querySelectorAll('wa-select.theme-selector').forEach(el => {
el.setAttribute('value', localStorage.getItem('theme') || 'default');
});
</script>