fix(console): stabilize workspace scrolling and background refresh

This commit is contained in:
2026-09-29 23:36:57 +08:00
parent 755cd2d3c3
commit 23db3d8fe0
8 changed files with 55 additions and 10 deletions

View File

@@ -39,7 +39,7 @@
loadScopeApplications().catch(error => showToast(`应用目录读取失败:${error.message}`));
}
text('scope-hint', ['workflows', 'retention', 'archives'].includes(next) ? '当前应用环境 · 不受队列筛选影响' : '任务、计划和订阅按所选队列显示');
window.scrollTo({ top: 0, behavior: 'instant' });
$('main-content').scrollTo({ top: 0, behavior: 'instant' });
if (matchMedia('(max-width:640px)').matches) document.querySelector('.nav-item.active')?.scrollIntoView({inline:'nearest',block:'nearest'});
if (next === 'retention' && state.scopeReady) loadRetention();
if (next === 'archives' && state.scopeReady) loadArchives();
@@ -863,7 +863,7 @@
if (!state.authenticated || !state.scopeReady) return;
if (lists[view]) await loadList(view, background === true);
else if (view === 'overview') await loadOverview();
else if (view === 'applications') await window.orbitApplications.load();
else if (view === 'applications') await window.orbitApplications.load({ background: background === true });
else if (view === 'retention') await loadRetention();
else if (view === 'archives') await loadArchives();
text('last-updated', `更新于 ${formatTime(new Date())}`);