Files
Scoreboard/console/renderer/index.html
T

126 lines
4.5 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta
http-equiv="Content-Security-Policy"
content="default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; connect-src 'none'"
/>
<title>Scoreboard Console · 启动管理</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<!-- 窗口是无边框的,标题栏和最小化/最大化/关闭三键都在这条上自绘 -->
<header id="titlebar" class="topbar">
<div class="brand">
<img class="brand-mark" src="scoreboard.png" alt="" width="30" height="30" />
<div>
<h1>Scoreboard Console</h1>
<p class="brand-sub">赛事积分榜 · 桌面宿主</p>
</div>
</div>
<div class="topbar-right">
<span id="app-version" class="muted"></span>
<div class="win-controls">
<button id="win-min" class="win-btn" type="button" title="最小化" aria-label="最小化">
<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true">
<path d="M5 12h14" />
</svg>
</button>
<button id="win-max" class="win-btn" type="button" title="最大化" aria-label="最大化">
<svg class="icon-max" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true">
<rect x="5" y="5" width="14" height="14" rx="2" />
</svg>
<svg class="icon-restore" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true">
<rect x="4" y="8" width="12" height="12" rx="2" />
<path d="M8 8V6a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2" />
</svg>
</button>
<button id="win-close" class="win-btn win-btn-close" type="button" title="关闭" aria-label="关闭">
<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true">
<path d="M6 6l12 12M18 6 6 18" />
</svg>
</button>
</div>
</div>
</header>
<main>
<section class="card">
<div class="card-head">
<h2>服务端状态</h2>
<div class="actions">
<button id="btn-start" class="btn primary" type="button">启动服务</button>
<button id="btn-stop" class="btn" type="button">停止服务</button>
<button id="btn-restart" class="btn" type="button">重启服务</button>
</div>
</div>
<div class="status-row">
<span id="state-dot" class="dot"></span>
<strong id="state-label">已停止</strong>
<span id="state-detail" class="muted"></span>
</div>
<dl class="kv">
<div>
<dt>服务地址</dt>
<dd id="k-url">—</dd>
</div>
<div>
<dt>进程 PID</dt>
<dd id="k-pid">—</dd>
</div>
<div>
<dt>自动重启</dt>
<dd id="k-restarts">—</dd>
</div>
<div>
<dt>防熄屏</dt>
<dd id="k-power">—</dd>
</div>
<div class="wide">
<dt>服务端程序</dt>
<dd id="k-exe" class="mono">—</dd>
</div>
<div class="wide">
<dt>配置文件</dt>
<dd id="k-config" class="mono">—</dd>
</div>
</dl>
<p id="config-warning" class="warning" hidden></p>
</section>
<section class="card">
<div class="card-head">
<h2>大屏窗口</h2>
<div class="actions">
<button id="btn-relayout" class="btn" type="button">重新排布</button>
<button id="btn-open-admin" class="btn" type="button">打开服务端管理面板</button>
</div>
</div>
<p class="hint">
单屏时窗口化、按 F11 切换全屏;多屏时除主屏外每块屏一个 kiosk 窗口,各锁一页。
</p>
<ul id="display-list" class="display-list">
<li class="muted">尚未打开大屏窗口</li>
</ul>
</section>
<section class="card log-card">
<div class="card-head">
<h2>运行日志</h2>
<div class="actions">
<label class="check"><input id="autoscroll" type="checkbox" checked /> 自动滚动</label>
<button id="btn-clear-log" class="btn" type="button">清空</button>
</div>
</div>
<pre id="log" class="log"></pre>
</section>
</main>
<script src="app.js"></script>
</body>
</html>