增加导航栏
This commit is contained in:
@@ -721,24 +721,6 @@ function syncKeySlTpFields() {
|
||||
if (tpEl) tpEl.style.display = mode === "trend_manual" ? "" : "none";
|
||||
}
|
||||
|
||||
function wireKeyMonitorSegGroup(groupId, hiddenInputId, onChange) {
|
||||
const group = document.getElementById(groupId);
|
||||
const hidden = document.getElementById(hiddenInputId);
|
||||
if (!group || !hidden) return;
|
||||
group.addEventListener("click", (ev) => {
|
||||
const btn = ev.target.closest && ev.target.closest(".matrix-seg-btn");
|
||||
if (!btn) return;
|
||||
group.querySelectorAll(".matrix-seg-btn").forEach((b) => b.classList.remove("is-active"));
|
||||
btn.classList.add("is-active");
|
||||
hidden.value = btn.getAttribute("data-value") || "";
|
||||
if (onChange) onChange();
|
||||
});
|
||||
}
|
||||
|
||||
function initKeyMonitorSegGroups() {
|
||||
wireKeyMonitorSegGroup("keyMonitorTypeSeg", "keyMonitorTypeInput");
|
||||
}
|
||||
|
||||
function setKeyMonitorActiveCount(n) {
|
||||
const el = document.getElementById("keyMonitorActiveCount");
|
||||
if (el) el.textContent = String(n);
|
||||
@@ -839,7 +821,6 @@ async function addKeyMonitor() {
|
||||
}
|
||||
|
||||
function wireKeyMonitorPanel() {
|
||||
initKeyMonitorSegGroups();
|
||||
const modeSel = document.getElementById("keySlTpModeInput");
|
||||
if (modeSel) modeSel.addEventListener("change", syncKeySlTpFields);
|
||||
syncKeySlTpFields();
|
||||
|
||||
Reference in New Issue
Block a user