feat(scheduler): scroll lock on by default, persisted in localStorage

This commit is contained in:
Gmer4Lfe
2026-05-24 19:58:44 -04:00
parent b754842da2
commit 51fe2664b8
@@ -381,6 +381,15 @@ function vvRestoreLastLog() {
function vvToggleScrollLock(cb) {
document.getElementById('vv-log-pre').style.overflowY = cb.checked ? 'hidden' : '';
localStorage.setItem('vv-scroll-lock', cb.checked ? '1' : '0');
}
function vvRestoreScrollLock() {
const val = localStorage.getItem('vv-scroll-lock');
const on = val === null ? true : val === '1';
const cb = document.getElementById('vv-scroll-lock');
cb.checked = on;
document.getElementById('vv-log-pre').style.overflowY = on ? 'hidden' : '';
}
function vvBackToSuggestions() {
@@ -413,8 +422,7 @@ function vvBackToSuggestions() {
document.getElementById('vv-scroll-lock-label').style.display = 'none';
document.getElementById('vv-invert-log-label').style.display = 'none';
document.getElementById('vv-auto-scroll').checked = true;
document.getElementById('vv-scroll-lock').checked = false;
document.getElementById('vv-log-pre').style.overflowY = '';
vvRestoreScrollLock();
document.getElementById('vv-log-title').textContent = 'Suggested Schedules';
document.getElementById('vv-log-ts').textContent = '';
document.getElementById('vv-log-dot').style.display = 'none';
@@ -807,6 +815,7 @@ function vvToggleSugBlock(bi) {
<script>
requestAnimationFrame(function() {
vvRestoreScrollLock();
const last = localStorage.getItem('vv-last-job');
if (last && document.querySelector('[data-id="' + CSS.escape(last) + '"]')) {
vvOpenRight(last);