From 68449425bed9aa8854e2caa07e488ca683aa6e60 Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Tue, 24 Mar 2026 21:05:47 +0100 Subject: [PATCH] [fix](trx-frontend-http): always list rig-specific and general bookmarks together Co-Authored-By: Claude Opus 4.6 Signed-off-by: Stan Grams --- .../trx-frontend-http/assets/web/plugins/bookmarks.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js index 8ddaa80..9119d9b 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js @@ -48,6 +48,12 @@ function bmSyncAccess() { if (selectAllBtn) selectAllBtn.style.display = canCtrl ? "" : "none"; } +/** The listing scope: always the active rig (to merge general + rig bookmarks). */ +function bmListScope() { + const rig = (typeof lastActiveRigId !== "undefined") ? lastActiveRigId : null; + return rig || "general"; +} + async function bmFetch(categoryFilter) { let url = "/bookmarks"; let hasQuery = false; @@ -55,7 +61,7 @@ async function bmFetch(categoryFilter) { url += "?category=" + encodeURIComponent(categoryFilter); hasQuery = true; } - url += bmScopeParam(hasQuery); + url += bmScopeParam(hasQuery, bmListScope()); try { const resp = await fetch(url); if (!resp.ok) throw new Error("HTTP " + resp.status); @@ -100,7 +106,7 @@ async function bmRefreshCategoryFilter(keepValue) { const modeSel = document.getElementById("bm-mode-filter"); if (!sel && !modeSel) return; try { - const resp = await fetch("/bookmarks" + bmScopeParam(false)); + const resp = await fetch("/bookmarks" + bmScopeParam(false, bmListScope())); if (!resp.ok) return; const all = await resp.json(); if (sel) {