[fix](trx-frontend): improve bookmark dialog and map tooltips

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-03 20:29:45 +01:00
parent 2eb3c4f66f
commit 68b6bfa0b7
3 changed files with 285 additions and 9 deletions
@@ -43,6 +43,9 @@ async function bmFetch(categoryFilter) {
console.error("Failed to fetch bookmarks:", e);
bmList = [];
}
if (typeof window.syncBookmarkMapLocators === "function") {
window.syncBookmarkMapLocators(bmList);
}
bmSyncAccess();
bmApplyFilters();
bmRefreshCategoryFilter(categoryFilter);
@@ -173,7 +176,7 @@ function bmOpenForm(bm) {
bmWriteDecoders(bm ? bm.decoders : []);
document.getElementById("bm-form-title").textContent = bm ? "Edit Bookmark" : "Add Bookmark";
wrap.style.display = "";
wrap.style.display = "flex";
document.getElementById("bm-name").focus();
}
@@ -350,6 +353,19 @@ async function bmApply(bm) {
// Form cancel
document.getElementById("bm-form-cancel").addEventListener("click", bmCloseForm);
const formWrap = document.getElementById("bm-form-wrap");
if (formWrap) {
formWrap.addEventListener("click", (e) => {
if (e.target === formWrap) bmCloseForm();
});
}
document.addEventListener("keydown", (e) => {
if (e.key === "Escape" && document.getElementById("bm-form-wrap")?.style.display === "flex") {
bmCloseForm();
}
});
// Table action buttons (event delegation)
document.getElementById("bm-tbody").addEventListener("click", async (e) => {
const tuneBtn = e.target.closest(".bm-tune-btn");