diff --git a/turnstone/ui/static/app.js b/turnstone/ui/static/app.js index 8f3daffd..6b26cb37 100644 --- a/turnstone/ui/static/app.js +++ b/turnstone/ui/static/app.js @@ -1112,6 +1112,19 @@ function updatePaneHeaders() { } else { root.classList.remove("multi-pane"); } + // Hide tab-bar split button when already in multi-pane mode + var splitBtn = document.getElementById("split-btn"); + if (splitBtn) { + if (leafCount > 1) { + splitBtn.classList.add("hidden"); + } else { + splitBtn.classList.remove("hidden"); + } + } +} + +function splitFocusedPane() { + if (focusedPaneId) splitPane(focusedPaneId, "horizontal"); } // --- Tree helpers --- @@ -1860,10 +1873,11 @@ document // =========================================================================== var tabBar = document.getElementById("tab-bar"); +var tabList = document.getElementById("tab-list"); var newTabBtn = document.getElementById("new-tab-btn"); function renderTabBar() { - tabBar.querySelectorAll(".ws-tab").forEach(function (t) { + tabList.querySelectorAll(".ws-tab").forEach(function (t) { t.remove(); }); @@ -1910,7 +1924,7 @@ function renderTabBar() { tab.appendChild(close); } - tabBar.insertBefore(tab, newTabBtn); + tabList.appendChild(tab); }); } diff --git a/turnstone/ui/static/index.html b/turnstone/ui/static/index.html index 460a3dc5..570dd5a9 100644 --- a/turnstone/ui/static/index.html +++ b/turnstone/ui/static/index.html @@ -35,8 +35,10 @@ -
- +