From beaafcb2afdfd5f1556237f097d809455e3d8a17 Mon Sep 17 00:00:00 2001 From: Simon Cordt Date: Thu, 25 Sep 2025 17:20:34 +0200 Subject: [PATCH] Refactor: Move toolbar outside of scrollable queue sections --- web/js/pqueue.ui.js | 8 ++++++-- web/js/pqueue.ui.render.js | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/web/js/pqueue.ui.js b/web/js/pqueue.ui.js index 46f67f0..4d7c86b 100644 --- a/web/js/pqueue.ui.js +++ b/web/js/pqueue.ui.js @@ -283,8 +283,7 @@ const root = UI.el("div", { class: "pqueue-root" }); dom.root = root; - - root.appendChild(UI.renderToolbar()); + const sections = UI.el("div", { class: "pqueue-sections" }); const metrics = UI.renderMetrics(); if (metrics) sections.appendChild(metrics); @@ -294,6 +293,11 @@ root.appendChild(sections); state.container.appendChild(root); + // Place toolbar outside of scrollable sections at the bottom + const toolbarHost = UI.el("div", { class: "pqueue-toolbar-host" }); + toolbarHost.appendChild(UI.renderToolbar()); + state.container.appendChild(toolbarHost); + dom.sections = sections; requestAnimationFrame(() => { diff --git a/web/js/pqueue.ui.render.js b/web/js/pqueue.ui.render.js index 0689b9f..ff2f273 100644 --- a/web/js/pqueue.ui.render.js +++ b/web/js/pqueue.ui.render.js @@ -46,8 +46,7 @@ const root = UI.el("div", { class: "pqueue-root" }); dom.root = root; - - root.appendChild(UI.renderToolbar()); + const sections = UI.el("div", { class: "pqueue-sections" }); const metrics = UI.renderMetrics(); if (metrics) sections.appendChild(metrics); @@ -57,6 +56,11 @@ root.appendChild(sections); state.container.appendChild(root); + // Place toolbar outside of scrollable sections at the bottom + const toolbarHost = UI.el("div", { class: "pqueue-toolbar-host" }); + toolbarHost.appendChild(UI.renderToolbar()); + state.container.appendChild(toolbarHost); + dom.sections = sections; requestAnimationFrame(() => {