Files
Scoreboard/console/renderer/styles.css
T
AskaEth 2c9ff65fc4 feat: 补齐第一批已知缺口(关闭握手 / 定时备份 / Origin 白名单 / DTO 收敛)
- httpapi:新增 POST /api/shutdown(admin 会话或 X-Shutdown-Token 常量时间比对)
  与 GET /api/rules/switches(recorder 可读,只回布尔开关);settings/standings 的
  重复 DTO 收敛到 internal/dto;standings.showIndividualMedals 贯通到设置读写与前端
- export:抽出 export.Service,新增自动备份定时任务(backup.intervalMinutes/keep),
  自动、手动、发布前三类备份共用同一把互斥锁与滚动清理
- realtime:/ws 去掉 InsecureSkipVerify,改用 OriginPatterns(同源与无 Origin 放行,
  跨站需命中 server.allowedOrigins)
- console:停止服务改走 POST /api/shutdown 优雅关闭(5 秒宽限后回退强杀),
  服务管理器新增「已连接的大屏实例」卡片
- deploy:build.bat 改用 for /f 读内部署名——set /p 在 chcp 65001 下返回空,
  导致最近这次构建的 exe 里根本没注入署名
- docs:备份策略、关闭超时、Origin 配置的说明与实现对齐
2026-09-09 21:41:08 +08:00

415 lines
6.4 KiB
CSS

:root {
--bg: #0f1420;
--panel: #161d2d;
--panel-2: #1d2637;
--border: #27314a;
--text: #e6ecf7;
--muted: #8b98b4;
--accent: #4fd8ff;
--ok: #3ddc97;
--warn: #ffb454;
--err: #ff6b6b;
}
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
margin: 0;
}
body {
display: flex;
flex-direction: column;
background: var(--bg);
color: var(--text);
font: 14px/1.5 "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
height: 50px;
flex: 0 0 auto;
padding: 0 8px 0 16px;
border-bottom: 1px solid var(--border);
background: var(--panel);
/* 整条标题栏拖拽,按钮区单独开洞,否则按钮点不动 */
-webkit-app-region: drag;
user-select: none;
}
.brand {
display: flex;
align-items: center;
gap: 12px;
}
.brand-mark {
width: 30px;
height: 30px;
border-radius: 8px;
object-fit: cover;
flex: none;
}
h1 {
margin: 0;
font-size: 15px;
font-weight: 600;
line-height: 1.25;
letter-spacing: 0.02em;
}
.brand-sub {
margin: 0;
font-size: 11px;
line-height: 1.3;
color: var(--muted);
}
.topbar-right {
display: flex;
align-items: center;
gap: 12px;
}
.win-controls {
display: flex;
align-items: center;
gap: 4px;
-webkit-app-region: no-drag;
}
.win-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 32px;
padding: 0;
border: 1px solid transparent;
border-radius: 8px;
background: transparent;
color: var(--muted);
cursor: pointer;
transition:
background 0.15s ease,
color 0.15s ease,
border-color 0.15s ease;
}
.win-btn svg {
fill: none;
stroke: currentColor;
stroke-width: 1.7;
stroke-linecap: round;
stroke-linejoin: round;
}
.win-btn:hover {
background: rgba(255, 255, 255, 0.08);
color: var(--text);
}
.win-btn:active {
background: rgba(255, 255, 255, 0.14);
}
.win-btn:focus-visible {
outline: 2px solid var(--accent);
outline-offset: -2px;
}
/* 关闭键是唯一的破坏性操作,hover 变红做区分 */
.win-btn-close:hover {
border-color: var(--err);
background: var(--err);
color: #fff;
}
.win-btn .icon-restore {
display: none;
}
.win-btn.is-maximized .icon-max {
display: none;
}
.win-btn.is-maximized .icon-restore {
display: block;
}
main {
flex: 1;
min-height: 0;
padding: 16px 20px 20px;
display: grid;
gap: 14px;
grid-template-columns: 1fr 1fr;
/* 五张卡片各占一整行;最后一行(运行日志)吃掉剩余高度 */
grid-template-rows: auto auto auto auto minmax(160px, 1fr);
overflow: auto;
}
.card {
grid-column: span 2;
padding: 14px 16px;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--panel);
}
.log-card {
display: flex;
flex-direction: column;
min-height: 0;
}
.card-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 10px;
}
h2 {
margin: 0;
font-size: 13px;
font-weight: 600;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.08em;
}
.actions {
display: flex;
gap: 8px;
align-items: center;
}
.btn {
padding: 6px 14px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--panel-2);
color: var(--text);
font-size: 13px;
cursor: pointer;
}
.btn:hover:not(:disabled) {
border-color: var(--accent);
}
.btn:disabled {
opacity: 0.45;
cursor: not-allowed;
}
.btn.primary {
border-color: transparent;
background: var(--accent);
color: #06202b;
font-weight: 600;
}
.status-row {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 12px;
font-size: 15px;
}
.dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--muted);
}
.dot.ok {
background: var(--ok);
box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.15);
}
.dot.warn {
background: var(--warn);
box-shadow: 0 0 0 4px rgba(255, 180, 84, 0.15);
}
.dot.err {
background: var(--err);
box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.15);
}
.muted {
color: var(--muted);
}
.kv {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 10px 16px;
margin: 0;
}
.kv > div.wide {
grid-column: span 2;
}
.kv dt {
margin: 0;
font-size: 12px;
color: var(--muted);
}
.kv dd {
margin: 2px 0 0;
word-break: break-all;
}
.mono {
font-family: Consolas, "Cascadia Mono", monospace;
font-size: 12px;
}
.warning {
margin: 12px 0 0;
padding: 8px 10px;
border-radius: 6px;
background: rgba(255, 180, 84, 0.12);
color: var(--warn);
font-size: 12px;
}
.hint {
margin: 0 0 10px;
font-size: 12px;
color: var(--muted);
}
.display-list {
margin: 0;
padding: 0;
list-style: none;
display: grid;
gap: 6px;
}
.display-list li {
display: flex;
gap: 10px;
padding: 8px 10px;
border-radius: 6px;
background: var(--panel-2);
font-size: 13px;
}
.display-list .page {
min-width: 96px;
color: var(--accent);
font-weight: 600;
}
.display-list .url {
color: var(--muted);
font-family: Consolas, "Cascadia Mono", monospace;
font-size: 12px;
word-break: break-all;
}
.display-list .state {
margin-left: auto;
flex: none;
font-weight: 600;
}
.display-list .state.online {
color: var(--ok);
}
.display-list .state.offline {
color: var(--muted);
}
.check {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: var(--muted);
cursor: pointer;
}
.form-row {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 10px 16px;
}
.field {
display: flex;
flex-direction: column;
gap: 4px;
font-size: 12px;
color: var(--muted);
}
.input {
padding: 6px 10px;
border: 1px solid var(--border);
border-radius: 6px;
background: #0a0e17;
color: var(--text);
font: inherit;
font-size: 13px;
}
.input:focus {
outline: none;
border-color: var(--accent);
}
.input:disabled {
opacity: 0.55;
cursor: not-allowed;
}
.hint.ok {
color: var(--ok);
}
.hint.err {
color: var(--err);
}
.log {
flex: 1;
min-height: 0;
margin: 0;
padding: 10px 12px;
overflow: auto;
border-radius: 8px;
background: #0a0e17;
color: #b9c6e0;
font-family: Consolas, "Cascadia Mono", monospace;
font-size: 12px;
line-height: 1.55;
white-space: pre-wrap;
word-break: break-all;
}
/* 账号重置的输出框沿用 .log 的终端样式,但要限高、别把卡片撑开 */
.account-output {
max-height: 180px;
margin: 10px 0 0;
}