126 lines
6.3 KiB
JavaScript
126 lines
6.3 KiB
JavaScript
// Panel/footer HTML templates split from index.html to keep markup maintainable.
|
|
(function mountPanelTemplates() {
|
|
const panelMount = document.getElementById("panelTemplatesMount");
|
|
if (panelMount) {
|
|
panelMount.innerHTML = `
|
|
<div class="panel monitorPanel" data-panel="monitor" role="tabpanel" hidden>
|
|
<section class="card cardShot">
|
|
<div class="cardTitle">
|
|
<span class="sectionIcon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M7 15l3-3 3 3 5-5"/></svg>
|
|
</span>
|
|
实时截图
|
|
</div>
|
|
<div class="preview">
|
|
<img id="liveShot" alt="实时截图预览" src="/pic/screenshot.png" />
|
|
<span class="previewBracket previewBracketTL" aria-hidden="true"></span>
|
|
<span class="previewBracket previewBracketTR" aria-hidden="true"></span>
|
|
<span class="previewBracket previewBracketBL" aria-hidden="true"></span>
|
|
<span class="previewBracket previewBracketBR" aria-hidden="true"></span>
|
|
<span class="previewRec" aria-hidden="true"><span class="previewRecDot"></span>REC</span>
|
|
<span id="liveShotTs" class="previewTs" hidden></span>
|
|
<button id="btnShotFullscreen" type="button" class="previewFullscreen" aria-label="全屏查看" data-tooltip="全屏查看" data-tooltip-pos="bottom">
|
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 8V3h5"/><path d="M21 8V3h-5"/><path d="M3 16v5h5"/><path d="M21 16v5h-5"/></svg>
|
|
</button>
|
|
</div>
|
|
<div class="hint" id="liveShotStatus">等待截图</div>
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<section class="card cardReservations panel" data-panel="reservations" role="tabpanel" hidden>
|
|
<div class="cardTitle">
|
|
<span class="sectionIcon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2L2 7l10 5 10-5-10-5z"/><path d="M2 17l10 5 10-5"/><path d="M2 12l10 5 10-5"/></svg>
|
|
</span>
|
|
预约队列
|
|
</div>
|
|
<div id="reservationsContent" class="reservationsContent">
|
|
<div class="hint">暂无预约信息</div>
|
|
</div>
|
|
|
|
<div class="divider"></div>
|
|
<details open>
|
|
<summary class="sectionTitle">已记录直播间(高价值)
|
|
<span class="summaryActions">
|
|
<button id="hv_expand_all" class="btn small">展开全部</button>
|
|
<button id="hv_collapse_all" class="btn small">折叠全部</button>
|
|
</span>
|
|
</summary>
|
|
<div id="highValueRoomsContent" class="reservationsContent">
|
|
<div class="hint">暂无记录</div>
|
|
</div>
|
|
</details>
|
|
</section>
|
|
|
|
<section class="card cardLog panel" data-panel="runLogs" role="tabpanel" hidden>
|
|
<div class="cardTitle">
|
|
<span class="sectionIcon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16v16H4z"/><path d="M8 8h8"/><path d="M8 12h8"/><path d="M8 16h6"/></svg>
|
|
</span>
|
|
运行日志
|
|
</div>
|
|
|
|
<div class="logSection singleLogSection">
|
|
<div class="logHeader">
|
|
<div class="logTitle">运行日志</div>
|
|
<div class="logHeaderActions">
|
|
<select id="runLogMode" class="small">
|
|
<option value="filter">筛选</option>
|
|
<option value="search">搜索</option>
|
|
</select>
|
|
<input id="runLogSearch" class="logSearchBox" placeholder="筛选/搜索运行日志" />
|
|
<button id="btnRunLogSearch" class="btn small">搜索</button>
|
|
<button id="btnRunLogClear" class="btn small">清除</button>
|
|
</div>
|
|
</div>
|
|
<pre id="runLog" class="log"></pre>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="card cardLog panel" data-panel="actionLogs" role="tabpanel" hidden>
|
|
<div class="cardTitle">
|
|
<span class="sectionIcon" aria-hidden="true">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 6h13"/><path d="M8 12h13"/><path d="M8 18h13"/><path d="M3 6h.01"/><path d="M3 12h.01"/><path d="M3 18h.01"/></svg>
|
|
</span>
|
|
行为日志
|
|
</div>
|
|
|
|
<div class="logSection singleLogSection">
|
|
<div class="logHeader">
|
|
<div class="logTitle">行为日志</div>
|
|
<div class="logHeaderActions">
|
|
<input id="actionsLogSearch" class="logSearchBox" placeholder="搜索行为日志(只在最近条目中搜索)" />
|
|
<button id="btnActionsRefresh" class="btn small">刷新</button>
|
|
</div>
|
|
</div>
|
|
<pre id="actionsLog" class="log"></pre>
|
|
</div>
|
|
</section>
|
|
`;
|
|
}
|
|
|
|
const footerMount = document.getElementById("appFooterMount");
|
|
if (footerMount) {
|
|
footerMount.innerHTML = `
|
|
<footer class="appFooter">
|
|
<div class="appFooterLeft">
|
|
<span class="appConnDot" id="appConnDot" data-state="idle" aria-hidden="true"></span>
|
|
<span class="appConnText" id="appConnText">就绪</span>
|
|
<span class="appFooterDivider" aria-hidden="true">·</span>
|
|
<span class="appFooterMeta">SYS_OK</span>
|
|
</div>
|
|
<div class="appFooterRight">
|
|
<span class="appFooterMeta hudPing" id="hudPing" title="API 响应时间">PING <em>—</em>ms</span>
|
|
<span class="appFooterDivider" aria-hidden="true">·</span>
|
|
<span class="appFooterMeta hudFps" id="hudFps" title="渲染帧率">FPS <em>—</em></span>
|
|
<span class="appFooterDivider" aria-hidden="true">·</span>
|
|
<span class="appFooterMeta" id="appFooterVersion">v—</span>
|
|
<span class="appFooterDivider" aria-hidden="true">·</span>
|
|
<span class="appFooterMeta" id="appFooterBuild">—</span>
|
|
</div>
|
|
</footer>
|
|
`;
|
|
}
|
|
})();
|