summaryrefslogtreecommitdiff
path: root/web/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app.js')
-rw-r--r--web/app.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/web/app.js b/web/app.js
index 6070d2c..9a5a460 100644
--- a/web/app.js
+++ b/web/app.js
@@ -407,6 +407,14 @@ export function setTaskFilterTab(tab) {
localStorage.setItem('taskFilterTab', tab);
}
+export function getActiveMainTab() {
+ return localStorage.getItem('activeMainTab') ?? 'queue';
+}
+
+export function setActiveMainTab(tab) {
+ localStorage.setItem('activeMainTab', tab);
+}
+
// ── Tab badge counts ───────────────────────────────────────────────────────────
/**
@@ -2721,6 +2729,8 @@ async function renderDropsPanel() {
// ── Tab switching ─────────────────────────────────────────────────────────────
function switchTab(name) {
+ setActiveMainTab(name);
+
// Update tab button active state
document.querySelectorAll('.tab').forEach(btn => {
btn.classList.toggle('active', btn.dataset.tab === name);
@@ -2746,7 +2756,7 @@ if (typeof document !== 'undefined') document.addEventListener('DOMContentLoaded
handleStartNextTask(this);
});
- switchTab('queue');
+ switchTab(getActiveMainTab());
startPolling();
connectWebSocket();