增加导航栏
This commit is contained in:
@@ -737,13 +737,17 @@ function wireKeyMonitorSegGroup(groupId, hiddenInputId, onChange) {
|
||||
|
||||
function initKeyMonitorSegGroups() {
|
||||
wireKeyMonitorSegGroup("keyMonitorTypeSeg", "keyMonitorTypeInput");
|
||||
wireKeyMonitorSegGroup("keyDirectionSeg", "keyDirectionInput");
|
||||
wireKeyMonitorSegGroup("keySlTpModeSeg", "keySlTpModeInput", syncKeySlTpFields);
|
||||
}
|
||||
|
||||
function setKeyMonitorActiveCount(n) {
|
||||
const el = document.getElementById("keyMonitorActiveCount");
|
||||
if (el) el.textContent = String(n);
|
||||
}
|
||||
|
||||
function renderKeyMonitorActiveList(rows) {
|
||||
const target = document.getElementById("keyMonitorActive");
|
||||
if (!target) return;
|
||||
setKeyMonitorActiveCount(rows.length);
|
||||
target.innerHTML = "";
|
||||
if (!rows.length) {
|
||||
target.innerHTML = '<div class="matrix-dim">暂无监控中的关键位</div>';
|
||||
@@ -836,6 +840,8 @@ async function addKeyMonitor() {
|
||||
|
||||
function wireKeyMonitorPanel() {
|
||||
initKeyMonitorSegGroups();
|
||||
const modeSel = document.getElementById("keySlTpModeInput");
|
||||
if (modeSel) modeSel.addEventListener("change", syncKeySlTpFields);
|
||||
syncKeySlTpFields();
|
||||
const addBtn = document.getElementById("keyAddBtn");
|
||||
if (addBtn) addBtn.addEventListener("click", addKeyMonitor);
|
||||
|
||||
Reference in New Issue
Block a user