增加导航栏
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();
|
||||
|
||||
@@ -1298,11 +1298,31 @@ pre {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.key-monitor-active-head {
|
||||
.key-monitor-cols {
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.key-monitor-col-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
margin-bottom: 8px;
|
||||
min-height: 28px;
|
||||
}
|
||||
|
||||
.key-monitor-col-head-main {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.key-monitor-export {
|
||||
flex-shrink: 0;
|
||||
text-decoration: none;
|
||||
font-size: 0.75rem;
|
||||
padding: 4px 8px;
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.key-monitor-count {
|
||||
@@ -1312,12 +1332,17 @@ pre {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.key-monitor-active-list {
|
||||
.key-monitor-scroll-list {
|
||||
max-height: calc(8 * 52px + 7 * 8px);
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.key-monitor-scroll-list > .item {
|
||||
min-height: 52px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.key-monitor-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -1801,10 +1826,14 @@ body.matrix-theme {
|
||||
font-size: 8px;
|
||||
}
|
||||
|
||||
.key-monitor-active-list {
|
||||
.key-monitor-scroll-list {
|
||||
max-height: calc(8 * 48px + 7 * 8px);
|
||||
}
|
||||
|
||||
.key-monitor-scroll-list > .item {
|
||||
min-height: 48px;
|
||||
}
|
||||
|
||||
.matrix-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
@@ -136,11 +136,10 @@
|
||||
<p id="keyMonitorRule" class="matrix-hint matrix-dim">// 规则加载中…</p>
|
||||
<div class="matrix-form-row matrix-form-row-wrap key-monitor-form">
|
||||
<input id="keySymbolInput" class="matrix-input key-monitor-field" type="text" placeholder="BTC 或 BTC/USDT" />
|
||||
<div class="matrix-seg-group" id="keyMonitorTypeSeg" aria-label="结构类型">
|
||||
<button type="button" class="matrix-seg-btn is-active" data-value="箱体突破">箱体</button>
|
||||
<button type="button" class="matrix-seg-btn" data-value="收敛突破">收敛</button>
|
||||
</div>
|
||||
<input type="hidden" id="keyMonitorTypeInput" value="箱体突破" />
|
||||
<select id="keyMonitorTypeInput" class="matrix-input key-monitor-field">
|
||||
<option value="箱体突破">箱体突破</option>
|
||||
<option value="收敛突破">收敛突破</option>
|
||||
</select>
|
||||
<select id="keyDirectionInput" class="matrix-input key-monitor-field">
|
||||
<option value="">方向</option>
|
||||
<option value="long">做多</option>
|
||||
@@ -159,20 +158,22 @@
|
||||
<button type="button" id="keyAddBtn" class="matrix-btn matrix-btn-pulse key-monitor-add">添加监控</button>
|
||||
</div>
|
||||
<p id="keyMonitorSaveMsg" class="matrix-msg"></p>
|
||||
<div class="matrix-two-col" style="margin-top:12px">
|
||||
<div class="matrix-two-col key-monitor-cols" style="margin-top:12px">
|
||||
<div>
|
||||
<div class="key-monitor-active-head">
|
||||
<h3 class="matrix-hint" style="margin:0">监控中</h3>
|
||||
<span id="keyMonitorActiveCount" class="matrix-chip key-monitor-count">0</span>
|
||||
<div class="key-monitor-col-head">
|
||||
<div class="key-monitor-col-head-main">
|
||||
<h3 class="matrix-hint" style="margin:0">监控中</h3>
|
||||
<span id="keyMonitorActiveCount" class="matrix-chip key-monitor-count">0</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="keyMonitorActive" class="matrix-list key-monitor-active-list"></div>
|
||||
<div id="keyMonitorActive" class="matrix-list key-monitor-scroll-list"></div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px">
|
||||
<div class="key-monitor-col-head">
|
||||
<h3 class="matrix-hint" style="margin:0">关键位历史</h3>
|
||||
<a id="keyHistoryExport" class="matrix-btn ghost" href="/export/key_monitor_history.csv?days=30" style="text-decoration:none;font-size:.75rem">导出 CSV</a>
|
||||
<a id="keyHistoryExport" class="matrix-btn ghost key-monitor-export" href="/export/key_monitor_history.csv?days=30">导出 CSV</a>
|
||||
</div>
|
||||
<div id="keyMonitorHistory" class="matrix-list"></div>
|
||||
<div id="keyMonitorHistory" class="matrix-list key-monitor-scroll-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user