增加折叠
This commit is contained in:
@@ -262,6 +262,64 @@ function renderDailyReport(payload) {
|
||||
`;
|
||||
}
|
||||
|
||||
const PANEL_FOLD_STORAGE_KEY = "matrix_panel_fold_v1";
|
||||
|
||||
function initPanelFolds() {
|
||||
let saved = {};
|
||||
try {
|
||||
const raw = localStorage.getItem(PANEL_FOLD_STORAGE_KEY);
|
||||
if (raw) saved = JSON.parse(raw);
|
||||
} catch (_) {
|
||||
saved = {};
|
||||
}
|
||||
|
||||
function applyFold(panel, folded) {
|
||||
const toggle = panel.querySelector(".matrix-panel-fold-toggle");
|
||||
if (folded) {
|
||||
panel.classList.add("is-folded");
|
||||
if (toggle) toggle.setAttribute("aria-expanded", "false");
|
||||
} else {
|
||||
panel.classList.remove("is-folded");
|
||||
if (toggle) toggle.setAttribute("aria-expanded", "true");
|
||||
}
|
||||
}
|
||||
|
||||
document.querySelectorAll(".matrix-panel-fold[data-fold-id]").forEach((panel) => {
|
||||
const id = panel.dataset.foldId;
|
||||
const defaultOpen = panel.dataset.foldDefault === "open";
|
||||
let folded;
|
||||
if (Object.prototype.hasOwnProperty.call(saved, id)) {
|
||||
folded = saved[id] === true;
|
||||
} else {
|
||||
folded = !defaultOpen;
|
||||
}
|
||||
applyFold(panel, folded);
|
||||
|
||||
const toggle = panel.querySelector(".matrix-panel-fold-toggle");
|
||||
if (!toggle) return;
|
||||
|
||||
const onToggle = (e) => {
|
||||
if (e.target.closest("[data-fold-ignore]")) return;
|
||||
const willFold = !panel.classList.contains("is-folded");
|
||||
applyFold(panel, willFold);
|
||||
saved[id] = willFold;
|
||||
try {
|
||||
localStorage.setItem(PANEL_FOLD_STORAGE_KEY, JSON.stringify(saved));
|
||||
} catch (_) {
|
||||
/* ignore quota */
|
||||
}
|
||||
};
|
||||
|
||||
toggle.addEventListener("click", onToggle);
|
||||
toggle.addEventListener("keydown", (e) => {
|
||||
if (e.key === "Enter" || e.key === " ") {
|
||||
e.preventDefault();
|
||||
onToggle(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function escapeHtml(s) {
|
||||
return String(s)
|
||||
.replace(/&/g, "&")
|
||||
@@ -782,6 +840,7 @@ tickClock();
|
||||
setInterval(tickClock, 1000);
|
||||
initMatrixRain();
|
||||
initFunnelWindowControls();
|
||||
initPanelFolds();
|
||||
refresh();
|
||||
setInterval(refresh, 4000);
|
||||
document.addEventListener("visibilitychange", () => {
|
||||
|
||||
@@ -1058,6 +1058,56 @@ pre {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.matrix-panel-head.matrix-panel-fold-toggle:not(.matrix-panel-head-row) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.matrix-panel-fold-toggle {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.matrix-panel-fold-toggle:focus-visible {
|
||||
outline: 1px solid rgba(0, 255, 213, 0.55);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.matrix-fold-head-right {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.matrix-fold-chevron {
|
||||
display: inline-block;
|
||||
font-size: 10px;
|
||||
color: #5ee0c5;
|
||||
transition: transform 0.2s ease;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.matrix-panel-fold.is-folded .matrix-fold-chevron {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.matrix-panel-fold.is-folded .matrix-panel-fold-body {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.matrix-panel-fold.is-folded {
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.matrix-panel-nested {
|
||||
padding: 12px 14px;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.matrix-chip {
|
||||
font-size: 9px;
|
||||
letter-spacing: 0.18em;
|
||||
|
||||
@@ -82,17 +82,21 @@
|
||||
</header>
|
||||
|
||||
<main class="matrix-main matrix-crt-inner">
|
||||
<section class="matrix-panel matrix-panel-hero matrix-panel-chrome">
|
||||
<section class="matrix-panel matrix-panel-hero matrix-panel-chrome matrix-panel-fold" data-fold-id="gemma-funnel" data-fold-default="open">
|
||||
<div class="matrix-panel-head matrix-panel-head-row matrix-panel-fold-toggle" role="button" tabindex="0" aria-expanded="true">
|
||||
<h2>// GEMMA 漏斗 · 优先矩阵</h2>
|
||||
<span class="matrix-fold-head-right">
|
||||
<span class="matrix-chip matrix-chip-magenta">LIVE FEED</span>
|
||||
<span class="matrix-fold-chevron" aria-hidden="true">▼</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="matrix-panel-fold-body">
|
||||
<div class="matrix-hero-radar" aria-hidden="true">
|
||||
<div class="matrix-hero-radar-grid"></div>
|
||||
<div class="matrix-hero-radar-sweep"></div>
|
||||
<div class="matrix-hero-radar-sweep matrix-hero-radar-sweep-trail"></div>
|
||||
<div class="matrix-hero-radar-ring"></div>
|
||||
</div>
|
||||
<div class="matrix-panel-head matrix-panel-head-row">
|
||||
<h2>// GEMMA 漏斗 · 优先矩阵</h2>
|
||||
<span class="matrix-chip matrix-chip-magenta">LIVE FEED</span>
|
||||
</div>
|
||||
<p class="matrix-hint">合成评分 · 成交量 · 日线结构 · 上方空间 · 中间阻力 → 达标企业微信推送</p>
|
||||
<div class="matrix-form-row matrix-form-row-tight">
|
||||
<label for="funnelWindowHoursInput">展示窗口(h)</label>
|
||||
@@ -102,13 +106,18 @@
|
||||
</div>
|
||||
<p id="funnelMeta" class="matrix-hint matrix-dim">// 数据同步中…</p>
|
||||
<div id="funnelMatrix" class="matrix-grid"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="matrix-panel matrix-panel-chrome" id="keyMonitorPanel">
|
||||
<div class="matrix-panel-head matrix-panel-head-row">
|
||||
<section class="matrix-panel matrix-panel-chrome matrix-panel-fold" id="keyMonitorPanel" data-fold-id="key-monitor" data-fold-default="open">
|
||||
<div class="matrix-panel-head matrix-panel-head-row matrix-panel-fold-toggle" role="button" tabindex="0" aria-expanded="true">
|
||||
<h2>// 关键位突破监控</h2>
|
||||
<span class="matrix-fold-head-right">
|
||||
<span class="matrix-chip matrix-dim">人工录入 · 5m 门控</span>
|
||||
<span class="matrix-fold-chevron" aria-hidden="true">▼</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="matrix-panel-fold-body">
|
||||
<p class="matrix-hint">GEMMA 漏斗仅供参考;在此录入上/下沿。箱体突破与收敛突破均支持「标准突破」或「趋势突破」(无 1.5H 方案)。</p>
|
||||
<p id="keyMonitorRule" class="matrix-hint matrix-dim">// 规则加载中…</p>
|
||||
<div class="matrix-form-row matrix-form-row-wrap">
|
||||
@@ -148,13 +157,18 @@
|
||||
<div id="keyMonitorHistory" class="matrix-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="matrix-panel matrix-panel-chrome">
|
||||
<div class="matrix-panel-head matrix-panel-head-row">
|
||||
<section class="matrix-panel matrix-panel-chrome matrix-panel-fold" data-fold-id="daily-report" data-fold-default="closed">
|
||||
<div class="matrix-panel-head matrix-panel-head-row matrix-panel-fold-toggle" role="button" tabindex="0" aria-expanded="false">
|
||||
<h2>// 每日晨报 · 昨日复盘</h2>
|
||||
<button type="button" id="runDailyReportBtn" class="matrix-btn ghost">立即生成</button>
|
||||
<span class="matrix-fold-head-right">
|
||||
<button type="button" id="runDailyReportBtn" class="matrix-btn ghost" data-fold-ignore>立即生成</button>
|
||||
<span class="matrix-fold-chevron" aria-hidden="true">▼</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="matrix-panel-fold-body">
|
||||
<div class="matrix-form-row">
|
||||
<label>晨报开关</label>
|
||||
<input id="dailyReportEnabledInput" type="checkbox" />
|
||||
@@ -169,13 +183,18 @@
|
||||
<p id="dailyReportSaveMsg" class="matrix-msg"></p>
|
||||
<p id="dailyReportMeta" class="matrix-hint matrix-dim">// 等待晨报数据…</p>
|
||||
<div id="dailyReportBox" class="matrix-list"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="matrix-panel matrix-panel-chrome">
|
||||
<div class="matrix-panel-head matrix-panel-head-row">
|
||||
<section class="matrix-panel matrix-panel-chrome matrix-panel-fold" data-fold-id="symbol-blocklist" data-fold-default="closed">
|
||||
<div class="matrix-panel-head matrix-panel-head-row matrix-panel-fold-toggle" role="button" tabindex="0" aria-expanded="false">
|
||||
<h2>// 监控黑名单 · base</h2>
|
||||
<span class="matrix-fold-head-right">
|
||||
<span class="matrix-chip matrix-dim" id="symbolBlocklistCountChip">0 条规则</span>
|
||||
<span class="matrix-fold-chevron" aria-hidden="true">▼</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="matrix-panel-fold-body">
|
||||
<p class="matrix-hint">
|
||||
Gate USDT 永续左侧 base(每行一个或逗号分隔),如 <code>XAU</code> <code>XAUT</code> <code>XAG</code>;<code>all_swaps</code> 与
|
||||
<code>watchlist</code> 均会在入池后剔除。保存后下一轮扫描生效。
|
||||
@@ -192,13 +211,18 @@
|
||||
<button type="button" id="saveSymbolBlocklistBtn" class="matrix-btn matrix-btn-pulse">保存黑名单</button>
|
||||
</div>
|
||||
<p id="symbolBlocklistSaveMsg" class="matrix-msg"></p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="matrix-panel matrix-panel-chrome" id="orderExecutorsPanel">
|
||||
<div class="matrix-panel-head matrix-panel-head-row">
|
||||
<section class="matrix-panel matrix-panel-chrome matrix-panel-fold" id="orderExecutorsPanel" data-fold-id="order-executors" data-fold-default="closed">
|
||||
<div class="matrix-panel-head matrix-panel-head-row matrix-panel-fold-toggle" role="button" tabindex="0" aria-expanded="false">
|
||||
<h2>// 下单执行器 · 转发链</h2>
|
||||
<span class="matrix-fold-head-right">
|
||||
<span class="matrix-chip matrix-dim">仅扫描端维护 · 同一信号广播</span>
|
||||
<span class="matrix-fold-chevron" aria-hidden="true">▼</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="matrix-panel-fold-body">
|
||||
<p class="matrix-hint">
|
||||
关键位门控通过且计划 RR 达标后,向列表中<strong>已启用</strong>的执行器 POST <code>/v1/signal</code>(单一 SL/TP,与录入方案一致)。
|
||||
各执行器自行配置 Gate API、盈亏比、移动保本等;<strong>不支持执行器反向注册</strong>。
|
||||
@@ -225,10 +249,15 @@
|
||||
</div>
|
||||
<p id="oeAddMsg" class="matrix-msg"></p>
|
||||
<div id="oeList" class="matrix-list" style="margin-top:12px"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="matrix-panel matrix-panel-chrome">
|
||||
<div class="matrix-panel-head"><h2>// 策略寄存器 · 5m</h2></div>
|
||||
<section class="matrix-panel matrix-panel-chrome matrix-panel-fold" data-fold-id="intraday-rules" data-fold-default="closed">
|
||||
<div class="matrix-panel-head matrix-panel-fold-toggle" role="button" tabindex="0" aria-expanded="false">
|
||||
<h2>// 策略寄存器 · 5m</h2>
|
||||
<span class="matrix-fold-chevron" aria-hidden="true">▼</span>
|
||||
</div>
|
||||
<div class="matrix-panel-fold-body">
|
||||
<p class="matrix-hint">全市场雷达:横盘 + 5m 突破 + 放量 · 仅参考推送 · 正式下单请用「关键位突破监控」</p>
|
||||
<div class="matrix-form-row">
|
||||
<label>横盘时长(h)</label>
|
||||
@@ -248,30 +277,50 @@
|
||||
<button type="button" id="saveIntradayBtn" class="matrix-btn matrix-btn-pulse">写入寄存器</button>
|
||||
</div>
|
||||
<p id="intradaySaveMsg" class="matrix-msg"></p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="matrix-panel matrix-panel-chrome matrix-panel-fold" data-fold-id="scan-layers" data-fold-default="closed">
|
||||
<div class="matrix-panel-head matrix-panel-fold-toggle" role="button" tabindex="0" aria-expanded="false">
|
||||
<h2>// 全市场扫描 · 观察层 / 触发层</h2>
|
||||
<span class="matrix-fold-chevron" aria-hidden="true">▼</span>
|
||||
</div>
|
||||
<div class="matrix-panel-fold-body">
|
||||
<p class="matrix-hint matrix-dim">自动箱体雷达 · 默认折叠 · 与关键位下单无关</p>
|
||||
<div class="matrix-two-col">
|
||||
<section class="matrix-panel matrix-panel-chrome">
|
||||
<div class="matrix-panel matrix-panel-chrome matrix-panel-nested">
|
||||
<div class="matrix-panel-head"><h2>// 观察层 · WATCH</h2></div>
|
||||
<div id="watchAlerts" class="matrix-list"></div>
|
||||
</section>
|
||||
<section class="matrix-panel matrix-panel-chrome">
|
||||
</div>
|
||||
<div class="matrix-panel matrix-panel-chrome matrix-panel-nested">
|
||||
<div class="matrix-panel-head"><h2>// 触发层 · TRIGGER</h2></div>
|
||||
<div id="triggerAlerts" class="matrix-list"></div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="matrix-panel matrix-panel-wide matrix-panel-chrome">
|
||||
<div class="matrix-panel-head"><h2>// 系统遥测</h2></div>
|
||||
<section class="matrix-panel matrix-panel-wide matrix-panel-chrome matrix-panel-fold" data-fold-id="telemetry" data-fold-default="closed">
|
||||
<div class="matrix-panel-head matrix-panel-fold-toggle" role="button" tabindex="0" aria-expanded="false">
|
||||
<h2>// 系统遥测</h2>
|
||||
<span class="matrix-fold-chevron" aria-hidden="true">▼</span>
|
||||
</div>
|
||||
<div class="matrix-panel-fold-body">
|
||||
<div class="matrix-split">
|
||||
<pre id="status" class="matrix-pre matrix-pre-glow"></pre>
|
||||
<pre id="config" class="matrix-pre matrix-pre-glow"></pre>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="matrix-panel matrix-panel-wide matrix-panel-chrome">
|
||||
<div class="matrix-panel-head"><h2>// 运行日志</h2></div>
|
||||
<section class="matrix-panel matrix-panel-wide matrix-panel-chrome matrix-panel-fold" data-fold-id="runtime-logs" data-fold-default="closed">
|
||||
<div class="matrix-panel-head matrix-panel-fold-toggle" role="button" tabindex="0" aria-expanded="false">
|
||||
<h2>// 运行日志</h2>
|
||||
<span class="matrix-fold-chevron" aria-hidden="true">▼</span>
|
||||
</div>
|
||||
<div class="matrix-panel-fold-body">
|
||||
<div id="logs" class="matrix-list matrix-list-logs"></div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user