summaryrefslogtreecommitdiff
path: root/web/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app.js')
-rw-r--r--web/app.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/web/app.js b/web/app.js
index 3121f28..187795f 100644
--- a/web/app.js
+++ b/web/app.js
@@ -278,6 +278,9 @@ export function filterActiveTasks(tasks) {
return tasks.filter(t => _PANEL_ACTIVE_STATES.has(t.state));
}
+// The New Task button is always visible regardless of active tab.
+export function newTaskButtonShouldShowOnTab(_tab) { return true; }
+
export function filterTasksByTab(tasks, tab) {
if (tab === 'active') return tasks.filter(t => ACTIVE_STATES.has(t.state));
if (tab === 'interrupted') return tasks.filter(t => INTERRUPTED_STATES.has(t.state));
@@ -2198,10 +2201,6 @@ function switchTab(name) {
}
});
- // Show/hide the header New Task button (only relevant on tasks tab)
- document.getElementById('btn-new-task').style.display =
- name === 'tasks' ? '' : 'none';
-
if (name === 'running') {
fetchTasks().then(renderRunningView).catch(() => {
const currentEl = document.querySelector('.running-current');