- 启用BLE连接事件长度优化,允许单CE内传输多包,提升OTA吞吐 - 缩减NimBLE mbuf池配置,单连接OTA场景节省约7KB内存 - 禁用未使用的标准GATT服务,仅保留自定义OTA service,节省8-15KB - 缩减NimBLE传输缓冲区配置以优化内存使用 refactor(debug_log): 重构环形日志缓冲区API以支持逐条弹出 - 新增ringPopOldest方法,支持弹出最旧日志并从缓冲区移除 - 重构ringDrainJson实现,基于新的逐条弹出机制 - 改进日志转义处理逻辑,支持更多特殊字符转义 perf(tasks): 优化各任务栈大小配置以节省内存 - 将ota_relay任务栈从12288字节缩减至6144字节 - 将ble_ota任务栈从8192字节缩减至4096字节 - 将ble_ota数据工作线程栈从8192字节缩减至4096字节 - 通过栈高水位监控验证实际使用情况,确保安全余量 feat(monitor): 添加任务句柄获取接口以支持系统状态监控 - 为HealthMonitor、OtaRelay、BleOta和WifiOta类添加任务句柄获取方法 - 在任务入口处记录当前任务句柄 - 便于系统状态监控和调试信息收集 feat(status): 扩展系统状态API以提供更详细的内存和任务信息 - 增加内部堆和默认堆的详细统计信息 - 添加各关键任务的栈使用情况监控 - 扩展/system/status端点返回更全面的系统资源使用情况 - 包含最大空闲块、最小空闲内存等关键指标
881 lines
26 KiB
CSS
881 lines
26 KiB
CSS
/* ===== ESP32 OTA 控制台 — 工业调试台风格 ===== */
|
|
|
|
:root {
|
|
--bg-root: #090e15;
|
|
--bg-panel: #0f161f;
|
|
--bg-card: #141d28;
|
|
--bg-elevated: #1a2432;
|
|
--bg-input: #0d131b;
|
|
--border: #1d2a3a;
|
|
--border-focus: #22d3ee;
|
|
--text: #e2e8f0;
|
|
--text-dim: #7b8fa8;
|
|
--text-label: #5a6d82;
|
|
--accent: #22d3ee;
|
|
--accent-dim: rgba(34,211,238,.15);
|
|
--green: #22c55e;
|
|
--amber: #f59e0b;
|
|
--red: #ef4444;
|
|
--radius-sm: 6px;
|
|
--radius: 10px;
|
|
--radius-lg: 14px;
|
|
--font: "PingFang SC","Microsoft YaHei","Segoe UI",system-ui,sans-serif;
|
|
--font-mono: "SF Mono","Fira Code","Cascadia Code","Consolas",monospace;
|
|
--gap: 16px;
|
|
}
|
|
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
html, body {
|
|
height: 100%;
|
|
background: var(--bg-root);
|
|
color: var(--text);
|
|
font-family: var(--font);
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
/* subtle noise-grid background */
|
|
body::before {
|
|
content: "";
|
|
position: fixed; inset: 0; z-index: 0; pointer-events: none;
|
|
background-image:
|
|
linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px),
|
|
linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
|
|
background-size: 40px 40px;
|
|
mask-image: radial-gradient(ellipse at 50% 0%, black 40%, transparent 70%);
|
|
}
|
|
|
|
.container {
|
|
position: relative; z-index: 1;
|
|
max-width: 1480px; margin: 0 auto; padding: 24px 32px 40px;
|
|
}
|
|
|
|
/* === HEADER — compact status bar === */
|
|
.header-bar {
|
|
display: flex; align-items: center; gap: 12px;
|
|
padding: 14px 20px; margin-bottom: 24px;
|
|
background: var(--bg-panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-lg);
|
|
flex-wrap: wrap;
|
|
}
|
|
.header-brand {
|
|
display: flex; align-items: center; gap: 10px;
|
|
padding-right: 20px; border-right: 1px solid var(--border);
|
|
white-space: nowrap;
|
|
}
|
|
.header-brand .dot-mark {
|
|
width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
|
|
box-shadow: 0 0 8px var(--accent-dim);
|
|
flex-shrink: 0;
|
|
}
|
|
.header-brand strong { font-size: 15px; font-weight: 700; }
|
|
.header-status {
|
|
display: flex; align-items: center; gap: 8px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.pill {
|
|
display: inline-flex; align-items: center; gap: 6px;
|
|
padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 500;
|
|
background: var(--bg-elevated); border: 1px solid var(--border);
|
|
white-space: nowrap;
|
|
}
|
|
.pill .indicator {
|
|
width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
|
|
}
|
|
.pill.online .indicator { background: var(--green); }
|
|
.pill.offline .indicator { background: var(--red); }
|
|
.pill.processing .indicator { background: var(--amber); animation: blink 1s infinite; }
|
|
.pill.idle .indicator { background: var(--text-dim); }
|
|
@keyframes blink { 50% { opacity: .35; } }
|
|
|
|
/* === MAIN LAYOUT === */
|
|
.main-layout {
|
|
display: grid;
|
|
grid-template-columns: 380px 1fr;
|
|
gap: var(--gap);
|
|
align-items: start;
|
|
}
|
|
|
|
/* === CARDS === */
|
|
.card {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
overflow: hidden;
|
|
}
|
|
.card + .card { margin-top: var(--gap); }
|
|
.card-head {
|
|
display: flex; align-items: center; gap: 8px;
|
|
padding: 14px 18px;
|
|
border-bottom: 1px solid var(--border);
|
|
font-size: 13px; font-weight: 600;
|
|
color: var(--text-dim);
|
|
text-transform: uppercase; letter-spacing: .06em;
|
|
}
|
|
.card-head .ico { font-size: 15px; }
|
|
.card-head-btn {
|
|
margin-left: auto;
|
|
padding: 4px 10px;
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
.card-body { padding: 16px 18px; }
|
|
.card.collapsed .card-body { display: none; }
|
|
.card-head { cursor: pointer; }
|
|
.card-head .collapse-arrow {
|
|
margin-left: auto; font-size: 10px; opacity: .45;
|
|
transition: transform .2s;
|
|
}
|
|
.card.collapsed .collapse-arrow { transform: rotate(-90deg); }
|
|
|
|
/* === FORM ELEMENTS === */
|
|
.form-row { margin-bottom: 14px; }
|
|
.form-row:last-child { margin-bottom: 0; }
|
|
.form-label {
|
|
display: block; font-size: 11px; color: var(--text-label);
|
|
text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px;
|
|
}
|
|
.input, select, textarea {
|
|
width: 100%; padding: 10px 12px; font-size: 13px; font-family: inherit;
|
|
background: var(--bg-input); color: var(--text);
|
|
border: 1px solid var(--border); border-radius: var(--radius-sm);
|
|
outline: none; transition: border-color .15s;
|
|
}
|
|
.input:focus, select:focus, textarea:focus {
|
|
border-color: var(--border-focus);
|
|
box-shadow: 0 0 0 3px var(--accent-dim);
|
|
}
|
|
select { cursor: pointer; }
|
|
select option { background: var(--bg-panel); color: var(--text); }
|
|
.input-group { display: flex; gap: 8px; }
|
|
.input-group .input { flex: 1; }
|
|
|
|
/* === BUTTONS === */
|
|
.btn {
|
|
display: inline-flex; align-items: center; justify-content: center; gap: 6px;
|
|
padding: 9px 16px; border: none; border-radius: var(--radius-sm);
|
|
font-size: 13px; font-weight: 600; cursor: pointer;
|
|
transition: opacity .15s, transform .15s;
|
|
font-family: inherit; white-space: nowrap;
|
|
}
|
|
.btn:hover:not(:disabled) { transform: translateY(-1px); }
|
|
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
|
|
.btn-primary { background: var(--accent); color: #07121c; }
|
|
.btn-primary:hover:not(:disabled) { opacity: .88; }
|
|
.btn-success { background: var(--green); color: #051a0c; }
|
|
.btn-danger { background: var(--red); color: #fff; }
|
|
.btn-outline {
|
|
background: transparent; color: var(--text-dim);
|
|
border: 1px solid var(--border);
|
|
}
|
|
.btn-outline:hover:not(:disabled) { background: var(--bg-elevated); color: var(--text); }
|
|
.btn-ghost {
|
|
background: transparent; color: var(--text-dim);
|
|
}
|
|
.btn-ghost:hover:not(:disabled) { background: var(--bg-elevated); color: var(--text); }
|
|
.btn-block { width: 100%; justify-content: center; }
|
|
.btn-sm { padding: 6px 12px; font-size: 12px; }
|
|
|
|
/* === CONNECTION STATUS ROW === */
|
|
.conn-indicator {
|
|
display: flex; align-items: center; gap: 10px;
|
|
padding: 12px 16px; border-radius: var(--radius-sm);
|
|
background: var(--bg-elevated); border: 1px solid var(--border);
|
|
font-size: 13px; font-weight: 500;
|
|
}
|
|
.conn-indicator .light {
|
|
width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
|
|
}
|
|
.conn-indicator.ok .light { background: var(--green); }
|
|
.conn-indicator.err .light { background: var(--red); }
|
|
.conn-indicator.warn .light { background: var(--amber); }
|
|
|
|
.helper-note {
|
|
margin-top: 10px;
|
|
padding: 10px 12px;
|
|
border-radius: var(--radius-sm);
|
|
border: 1px solid var(--border);
|
|
background: var(--bg-elevated);
|
|
font-size: 12px;
|
|
line-height: 1.6;
|
|
color: var(--text-dim);
|
|
}
|
|
.helper-note.ok { border-color: rgba(34,197,94,.25); color: #b8f5cb; }
|
|
.helper-note.warn { border-color: rgba(245,158,11,.25); color: #fbd38d; }
|
|
.helper-note.err { border-color: rgba(239,68,68,.25); color: #fecaca; }
|
|
.helper-note code { color: #d7fbff; font-family: var(--font-mono); }
|
|
|
|
/* === UPLOAD ZONE === */
|
|
.upload-zone {
|
|
border: 2px dashed var(--border); border-radius: var(--radius);
|
|
padding: 28px 16px; text-align: center; cursor: pointer;
|
|
transition: border-color .2s, background .2s;
|
|
}
|
|
.upload-zone:hover,
|
|
.upload-zone.dragover { border-color: var(--accent); background: var(--accent-dim); }
|
|
.upload-zone .upload-ico { font-size: 32px; margin-bottom: 10px; }
|
|
.upload-zone h4 { font-size: 14px; margin-bottom: 4px; }
|
|
.upload-zone p { font-size: 12px; color: var(--text-dim); }
|
|
.upload-zone-sm { padding: 16px 12px; }
|
|
.upload-zone-sm .upload-ico { font-size: 24px; margin-bottom: 6px; }
|
|
.upload-zone-sm h4 { font-size: 13px; }
|
|
|
|
/* === FILE INFO === */
|
|
.file-info {
|
|
display: none; margin-top: 12px;
|
|
background: var(--bg-elevated); border-radius: var(--radius-sm); padding: 12px 14px;
|
|
}
|
|
.file-info.show { display: block; }
|
|
.file-info-row { display: flex; justify-content: space-between; align-items: center; }
|
|
.file-info-row + .file-info-row { margin-top: 10px; }
|
|
.file-info-grid {
|
|
display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px;
|
|
}
|
|
.file-meta-item {
|
|
background: var(--bg-card); padding: 8px 10px; border-radius: 6px;
|
|
font-size: 12px;
|
|
}
|
|
.file-meta-item span { color: var(--text-label); display: block; font-size: 10px; margin-bottom: 2px; }
|
|
.file-meta-item b { font-weight: 600; }
|
|
|
|
/* === PROGRESS === */
|
|
.progress-phase-row {
|
|
display: flex; align-items: center; gap: 0; margin-bottom: 14px;
|
|
flex-wrap: nowrap;
|
|
background: var(--bg-input);
|
|
border-radius: 20px;
|
|
padding: 4px;
|
|
border: 1px solid var(--border);
|
|
}
|
|
.pp-step {
|
|
flex: 1;
|
|
display: flex; align-items: center; justify-content: center; gap: 5px;
|
|
padding: 7px 10px; border-radius: 16px;
|
|
font-size: 12px; font-weight: 600; color: var(--text-dim);
|
|
background: transparent;
|
|
transition: all .25s ease; white-space: nowrap;
|
|
cursor: default;
|
|
}
|
|
.pp-ico { font-size: 13px; opacity: .45; transition: all .25s ease; }
|
|
.pp-txt { transition: color .25s ease; }
|
|
.pp-sep { display: none; }
|
|
|
|
/* Active step — highlighted capsule */
|
|
.pp-step.active {
|
|
color: #07121c;
|
|
background: var(--accent);
|
|
box-shadow: 0 0 10px var(--accent-dim);
|
|
}
|
|
.pp-step.active .pp-ico { opacity: 1; }
|
|
.pp-step.active .pp-txt { color: #07121c; }
|
|
|
|
/* Done step — green outlined capsule */
|
|
.pp-step.done {
|
|
color: var(--green);
|
|
background: rgba(34,197,94,.12);
|
|
}
|
|
.pp-step.done .pp-ico { opacity: 1; }
|
|
.pp-step.done .pp-txt::after {
|
|
content: ' ✓'; font-size: 10px;
|
|
}
|
|
|
|
.progress-wrap { margin-top: 0; display: none; }
|
|
.progress-wrap.show { display: block; }
|
|
.progress-track {
|
|
width: 100%; height: 10px; border-radius: 20px;
|
|
background: var(--bg-input); overflow: hidden;
|
|
box-shadow: inset 0 1px 2px rgba(0,0,0,.3);
|
|
}
|
|
.progress-fill {
|
|
height: 100%; border-radius: 20px;
|
|
background: linear-gradient(90deg, #22d3ee, #06b6d4);
|
|
width: 0%; transition: width .3s ease;
|
|
position: relative;
|
|
box-shadow: 0 0 8px rgba(34,211,238,.3);
|
|
}
|
|
.progress-fill::after {
|
|
content: ""; position: absolute; inset: 0;
|
|
background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.3) 50%, transparent 100%);
|
|
animation: sweep 1.6s linear infinite;
|
|
}
|
|
.progress-fill.done {
|
|
background: linear-gradient(90deg, #22c55e, #16a34a);
|
|
box-shadow: 0 0 8px rgba(34,197,94,.3);
|
|
}
|
|
@keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
|
|
.progress-text {
|
|
display: flex; justify-content: space-between; margin-top: 7px;
|
|
font-size: 12px; color: var(--text-dim);
|
|
}
|
|
|
|
/* === BUTTON ROW === */
|
|
.btn-row { display: flex; gap: 10px; margin-top: 16px; }
|
|
.btn-row .btn { flex: 1; }
|
|
|
|
/* === METRIC GRID === */
|
|
.metric-grid {
|
|
display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
|
|
}
|
|
.metric {
|
|
background: var(--bg-elevated); border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm); padding: 12px 14px;
|
|
}
|
|
.metric .k {
|
|
font-size: 10px; color: var(--text-label); text-transform: uppercase;
|
|
letter-spacing: .1em; margin-bottom: 4px;
|
|
}
|
|
.metric .v {
|
|
font-size: 20px; font-weight: 700; word-break: break-word;
|
|
}
|
|
.metric .v.highlight { color: var(--accent); }
|
|
|
|
.status-kv-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 10px;
|
|
}
|
|
.status-kv {
|
|
background: var(--bg-elevated);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
padding: 10px 12px;
|
|
}
|
|
.status-kv .k {
|
|
display: block;
|
|
font-size: 10px;
|
|
color: var(--text-label);
|
|
text-transform: uppercase;
|
|
letter-spacing: .08em;
|
|
margin-bottom: 4px;
|
|
}
|
|
.status-kv b {
|
|
display: block;
|
|
color: var(--text);
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
word-break: break-word;
|
|
font-family: var(--font-mono);
|
|
}
|
|
.status-section-title { margin-top: 14px; margin-bottom: 8px; font-size: 11px; color: var(--text-label); text-transform: uppercase; letter-spacing: .08em; }
|
|
|
|
/* ===== 堆概况 ===== */
|
|
.heap-group {
|
|
background: rgba(255,255,255,0.02);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 12px 14px;
|
|
margin-bottom: 10px;
|
|
}
|
|
.heap-group:last-child { margin-bottom: 0; }
|
|
|
|
.heap-group-title {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--text-label);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.06em;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.heap-bar-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.heap-bar-text {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
white-space: nowrap;
|
|
min-width: 165px;
|
|
color: var(--text);
|
|
}
|
|
|
|
.heap-bar-track {
|
|
flex: 1;
|
|
height: 14px;
|
|
background: rgba(255,255,255,0.06);
|
|
border-radius: 7px;
|
|
overflow: hidden;
|
|
position: relative;
|
|
}
|
|
|
|
.heap-bar-fill {
|
|
display: block;
|
|
height: 100%;
|
|
border-radius: 7px;
|
|
background: linear-gradient(90deg, var(--accent), #5eead4);
|
|
transition: width .4s ease;
|
|
.heap-bar-fill.warn {
|
|
background: linear-gradient(90deg, #f59e0b, #d97706);
|
|
}
|
|
.heap-bar-fill.danger {
|
|
background: linear-gradient(90deg, #ef4444, #dc2626);
|
|
}
|
|
}
|
|
|
|
.heap-bar-pct {
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
min-width: 42px;
|
|
text-align: right;
|
|
font-variant-numeric: tabular-nums;
|
|
color: var(--text-dim);
|
|
}
|
|
|
|
.heap-detail-row {
|
|
display: flex;
|
|
gap: 16px;
|
|
font-size: 11px;
|
|
color: var(--text-dim);
|
|
margin-top: 6px;
|
|
padding-top: 6px;
|
|
border-top: 1px solid rgba(255,255,255,0.04);
|
|
flex-wrap: wrap;
|
|
}
|
|
.heap-detail-row span {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
.heap-detail-row b {
|
|
color: var(--text);
|
|
font-weight: 500;
|
|
font-family: var(--font-mono);
|
|
font-size: 11px;
|
|
}
|
|
|
|
.status-task-list {
|
|
display: grid;
|
|
gap: 8px;
|
|
}
|
|
.status-task {
|
|
background: var(--bg-elevated);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
padding: 10px 12px;
|
|
}
|
|
.status-task-head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
margin-bottom: 8px;
|
|
}
|
|
.status-task-name {
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
color: var(--text);
|
|
font-family: var(--font-mono);
|
|
}
|
|
.status-task-ratio {
|
|
font-size: 11px;
|
|
color: var(--text-dim);
|
|
font-family: var(--font-mono);
|
|
}
|
|
.status-task-bar {
|
|
width: 100%;
|
|
height: 8px;
|
|
border-radius: 999px;
|
|
background: var(--bg-input);
|
|
overflow: hidden;
|
|
margin-bottom: 8px;
|
|
}
|
|
.status-task-bar-fill {
|
|
height: 100%;
|
|
border-radius: 999px;
|
|
background: linear-gradient(90deg, #22d3ee, #06b6d4);
|
|
}
|
|
.status-task-bar-fill.warn {
|
|
background: linear-gradient(90deg, #f59e0b, #d97706);
|
|
}
|
|
.status-task-bar-fill.err {
|
|
background: linear-gradient(90deg, #ef4444, #dc2626);
|
|
}
|
|
.status-task-meta {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 8px;
|
|
}
|
|
.status-task-meta span {
|
|
display: block;
|
|
font-size: 10px;
|
|
color: var(--text-label);
|
|
text-transform: uppercase;
|
|
letter-spacing: .06em;
|
|
}
|
|
.status-task-meta b {
|
|
display: block;
|
|
margin-top: 2px;
|
|
color: var(--text);
|
|
font-size: 11px;
|
|
font-family: var(--font-mono);
|
|
}
|
|
.status-json {
|
|
margin-top: 0;
|
|
padding: 12px;
|
|
border-radius: var(--radius-sm);
|
|
border: 1px solid var(--border);
|
|
background: var(--bg-elevated);
|
|
color: var(--text-dim);
|
|
font-size: 11px;
|
|
line-height: 1.6;
|
|
max-height: 280px;
|
|
overflow: auto;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
font-family: var(--font-mono);
|
|
}
|
|
.status-empty {
|
|
padding: 12px;
|
|
border: 1px dashed var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-dim);
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* === PRIMARY STATUS BADGES (large) === */
|
|
.badge-grid {
|
|
display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
|
|
}
|
|
.badge-stat {
|
|
background: var(--bg-elevated); border: 1px solid var(--border);
|
|
border-radius: var(--radius); padding: 14px 16px; text-align: center;
|
|
}
|
|
.badge-stat .v {
|
|
font-size: 22px; font-weight: 700;
|
|
}
|
|
.badge-stat .v.accent { color: var(--accent); }
|
|
.badge-stat .v.ok { color: var(--green); }
|
|
.badge-stat .v.warn { color: var(--amber); }
|
|
.badge-stat .v.err { color: var(--red); }
|
|
.badge-stat .k {
|
|
font-size: 10px; color: var(--text-label); text-transform: uppercase;
|
|
letter-spacing: .1em; margin-top: 2px;
|
|
}
|
|
|
|
/* === OTA STAGE FLOW === */
|
|
.stage-flow {
|
|
display: flex; align-items: flex-start; gap: 0; padding: 8px 0;
|
|
}
|
|
.stage-node {
|
|
flex: 1; display: flex; flex-direction: column; align-items: center;
|
|
gap: 6px; position: relative;
|
|
}
|
|
.stage-node:not(:last-child)::after {
|
|
content: ""; position: absolute; top: 18px; left: calc(50% + 18px);
|
|
width: calc(100% - 36px); height: 2px;
|
|
background: var(--border); transition: background .3s;
|
|
}
|
|
.stage-node.done:not(:last-child)::after,
|
|
.stage-node.live:not(:last-child)::after { background: var(--accent); }
|
|
.stage-dot {
|
|
width: 36px; height: 36px; border-radius: 50%;
|
|
background: var(--bg-input); border: 2px solid var(--border);
|
|
display: flex; align-items: center; justify-content: center;
|
|
font-size: 16px; z-index: 1; transition: all .3s;
|
|
}
|
|
.stage-node.live .stage-dot {
|
|
background: var(--accent); border-color: var(--accent); color: #07121c;
|
|
box-shadow: 0 0 12px var(--accent-dim);
|
|
}
|
|
.stage-node.done .stage-dot {
|
|
background: var(--green); border-color: var(--green); color: #fff;
|
|
}
|
|
.stage-node.err .stage-dot {
|
|
background: var(--red); border-color: var(--red); color: #fff;
|
|
}
|
|
.stage-label {
|
|
font-size: 11px; color: var(--text-label); text-align: center; line-height: 1.3;
|
|
}
|
|
.stage-detail {
|
|
font-size: 10px; color: var(--accent); text-align: center; line-height: 1.2;
|
|
margin-top: 2px; min-height: 14px;
|
|
font-family: var(--font-mono);
|
|
transition: color .3s;
|
|
}
|
|
.stage-node.live .stage-label,
|
|
.stage-node.done .stage-label,
|
|
.stage-node.err .stage-label { color: var(--text); }
|
|
.stage-node.live .stage-detail { color: var(--accent); }
|
|
.stage-node.done .stage-detail { color: var(--green); }
|
|
.stage-node.err .stage-detail { color: var(--red); }
|
|
|
|
/* Stage status bar */
|
|
.stage-status-bar {
|
|
display: flex; align-items: center; gap: 10px;
|
|
margin-top: 14px; padding: 10px 16px;
|
|
border-radius: 20px;
|
|
background: var(--bg-elevated); border: 1px solid var(--border);
|
|
font-size: 13px;
|
|
transition: all .3s;
|
|
}
|
|
.stage-status-bar .ssb-dot {
|
|
width: 8px; height: 8px; border-radius: 50%;
|
|
flex-shrink: 0;
|
|
background: var(--text-dim);
|
|
transition: all .3s;
|
|
}
|
|
.stage-status-bar .ssb-text {
|
|
color: var(--text-dim); font-size: 13px; font-weight: 500;
|
|
letter-spacing: .01em;
|
|
}
|
|
/* idle — muted, with subtle pulse */
|
|
.stage-status-bar .ssb-dot { animation: dotPulse 2.5s ease-in-out infinite; }
|
|
@keyframes dotPulse {
|
|
0%, 100% { opacity: .45; }
|
|
50% { opacity: .8; }
|
|
}
|
|
/* active — accent colored */
|
|
.stage-status-bar.active {
|
|
border-color: rgba(34,211,238,.25);
|
|
background: linear-gradient(135deg, rgba(34,211,238,.06), rgba(34,211,238,.02));
|
|
}
|
|
.stage-status-bar.active .ssb-dot {
|
|
background: var(--accent);
|
|
box-shadow: 0 0 6px var(--accent-dim);
|
|
animation: dotPulseLive 1.2s ease-in-out infinite;
|
|
}
|
|
.stage-status-bar.active .ssb-text { color: var(--accent); font-weight: 600; }
|
|
@keyframes dotPulseLive {
|
|
0%, 100% { opacity: .7; transform: scale(1); }
|
|
50% { opacity: 1; transform: scale(1.25); }
|
|
}
|
|
/* ok — green */
|
|
.stage-status-bar.ok {
|
|
border-color: rgba(34,197,94,.25);
|
|
background: linear-gradient(135deg, rgba(34,197,94,.06), rgba(34,197,94,.02));
|
|
}
|
|
.stage-status-bar.ok .ssb-dot {
|
|
background: var(--green);
|
|
box-shadow: 0 0 6px rgba(34,197,94,.3);
|
|
animation: none;
|
|
}
|
|
.stage-status-bar.ok .ssb-text { color: var(--green); font-weight: 600; }
|
|
/* err — red */
|
|
.stage-status-bar.err {
|
|
border-color: rgba(239,68,68,.25);
|
|
background: linear-gradient(135deg, rgba(239,68,68,.06), rgba(239,68,68,.02));
|
|
}
|
|
.stage-status-bar.err .ssb-dot {
|
|
background: var(--red);
|
|
box-shadow: 0 0 6px rgba(239,68,68,.3);
|
|
animation: none;
|
|
}
|
|
.stage-status-bar.err .ssb-text { color: var(--red); font-weight: 600; }
|
|
|
|
/* Stage verification info panel */
|
|
.stage-verify-info {
|
|
margin-top: 12px; padding: 12px 14px;
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg-elevated); border: 1px solid var(--border);
|
|
}
|
|
.svi-row {
|
|
display: flex; align-items: flex-start; gap: 12px;
|
|
padding: 6px 0; font-size: 12px;
|
|
border-bottom: 1px solid rgba(255,255,255,.03);
|
|
}
|
|
.svi-row:last-child { border-bottom: none; }
|
|
.svi-key {
|
|
color: var(--text-label); font-weight: 600;
|
|
text-transform: uppercase; letter-spacing: .06em; font-size: 10px;
|
|
min-width: 100px; flex-shrink: 0;
|
|
padding-top: 2px;
|
|
}
|
|
.svi-val {
|
|
color: var(--text-dim); font-family: var(--font-mono); font-size: 11px;
|
|
word-break: break-all;
|
|
}
|
|
.svi-val.ok { color: var(--green); font-weight: 600; }
|
|
.svi-val.err { color: var(--red); font-weight: 600; }
|
|
|
|
/* Stage result panel - 上位机确认 0x07/0x85 收尾 */
|
|
.stage-result {
|
|
margin-top: 12px; padding: 14px 16px;
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg-elevated); border: 1px solid var(--border);
|
|
display: flex; flex-direction: column; gap: 10px;
|
|
}
|
|
.stage-result.ok { border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.08); }
|
|
.stage-result.err { border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.08); }
|
|
.stage-result .sr-head { display: flex; align-items: center; gap: 10px; }
|
|
.stage-result .sr-ico {
|
|
width: 32px; height: 32px; border-radius: 50%;
|
|
display: inline-flex; align-items: center; justify-content: center;
|
|
font-size: 18px; font-weight: 700; color: #07121c;
|
|
}
|
|
.stage-result.ok .sr-ico { background: var(--green); }
|
|
.stage-result.err .sr-ico { background: var(--red); }
|
|
.stage-result .sr-title { font-size: 16px; font-weight: 700; }
|
|
.stage-result.ok .sr-title { color: var(--green); }
|
|
.stage-result.err .sr-title { color: var(--red); }
|
|
.stage-result .sr-detail { font-size: 13px; color: var(--text); line-height: 1.5; }
|
|
.stage-result .sr-actions { display: flex; justify-content: flex-end; gap: 8px; }
|
|
|
|
/* === LOG PANEL === */
|
|
.log-panel { display: flex; flex-direction: column; min-height: 380px; }
|
|
.log-panel .card-body { flex: 1; display: flex; flex-direction: column; padding: 0; }
|
|
.log-toolbar {
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
padding: 10px 16px; border-bottom: 1px solid var(--border);
|
|
gap: 10px; flex-wrap: wrap;
|
|
}
|
|
.log-filters { display: flex; gap: 6px; }
|
|
.log-filter {
|
|
padding: 4px 10px; border-radius: 14px; font-size: 11px; font-weight: 500;
|
|
border: 1px solid var(--border); background: transparent; color: var(--text-dim);
|
|
cursor: pointer; transition: all .15s;
|
|
}
|
|
.log-filter.active { background: var(--accent); color: #07121c; border-color: var(--accent); }
|
|
.log-filter:hover:not(.active) { border-color: var(--text-dim); }
|
|
|
|
.log-scroll {
|
|
flex: 1; overflow-y: auto; padding: 12px 16px;
|
|
font-family: var(--font-mono); font-size: 12px; line-height: 1.7;
|
|
max-height: 420px;
|
|
}
|
|
.log-scroll::-webkit-scrollbar { width: 5px; }
|
|
.log-scroll::-webkit-scrollbar-track { background: transparent; }
|
|
.log-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|
|
|
|
.log-line {
|
|
display: flex; gap: 8px; padding: 3px 0;
|
|
border-bottom: 1px solid rgba(255,255,255,.02);
|
|
}
|
|
.log-line .lt { color: var(--text-label); flex-shrink: 0; }
|
|
.log-line .lv {
|
|
font-weight: 600; min-width: 20px; flex-shrink: 0;
|
|
}
|
|
.log-line .lv.E { color: var(--red); }
|
|
.log-line .lv.W { color: var(--amber); }
|
|
.log-line .lv.I { color: var(--accent); }
|
|
.log-line .lv.D { color: var(--text-label); }
|
|
.log-line .lg { color: #a78bfa; flex-shrink: 0; }
|
|
.log-line .lm { color: var(--text); word-break: break-all; }
|
|
/* BLE log compat */
|
|
.log-line .t { color: var(--text-label); flex-shrink: 0; }
|
|
.log-line .tag { color: #a78bfa; flex-shrink: 0; }
|
|
|
|
.log-foot {
|
|
display: flex; justify-content: space-between; align-items: center;
|
|
padding: 8px 16px; border-top: 1px solid var(--border);
|
|
font-size: 11px; color: var(--text-label);
|
|
}
|
|
|
|
/* === CAN PANEL === */
|
|
.can-grid {
|
|
display: grid; grid-template-columns: 70px 1fr 60px 1fr; gap: 10px;
|
|
}
|
|
.spi-grid {
|
|
display: grid; grid-template-columns: 80px 1fr 80px 80px; gap: 10px;
|
|
}
|
|
|
|
/* === TOAST === */
|
|
.toast {
|
|
position: fixed; top: 45%; left: 50%; transform: translateX(-50%) translateY(30px);
|
|
z-index: 9999;
|
|
display: flex; align-items: center; gap: 10px;
|
|
padding: 14px 24px; border-radius: 10px;
|
|
font-size: 14px; font-weight: 600; color: #fff; pointer-events: none;
|
|
opacity: 0;
|
|
transition: all .35s cubic-bezier(.4,0,.2,1);
|
|
box-shadow: 0 8px 32px rgba(0,0,0,.35);
|
|
}
|
|
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
|
|
.toast.ok { background: #16a34a; }
|
|
.toast.err { background: #dc2626; }
|
|
.toast.warn { background: #d97706; }
|
|
.toast .toast-ico { font-size: 18px; }
|
|
|
|
/* === GRID ROWS === */
|
|
.row-2, .row-3, .row-4 { display: grid; gap: 10px; }
|
|
.row-2 { grid-template-columns: 1fr 1fr; }
|
|
.row-3 { grid-template-columns: repeat(3, 1fr); }
|
|
.row-4 { grid-template-columns: repeat(4, 1fr); }
|
|
|
|
/* === SUB ACTIONS === */
|
|
.sub-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
|
|
|
|
/* === FOOTER NOTE === */
|
|
.footer-note { margin-top: 12px; font-size: 12px; line-height: 1.7; color: var(--text-dim); }
|
|
|
|
/* === CODE === */
|
|
code { color: #d3f9ff; font-family: var(--font-mono); }
|
|
|
|
/* === FILE INFO BORDER === */
|
|
.file-info { border: 1px solid var(--border); }
|
|
|
|
/* === PILL LIVE === */
|
|
.pill.live .indicator { background: var(--amber); animation: blink 1s infinite; }
|
|
|
|
/* ===== Header sub-row (设备名/设备ID) ===== */
|
|
.header-sub {
|
|
display: flex; gap: 12px;
|
|
margin-top: 0;
|
|
padding: 0;
|
|
}
|
|
.pill-val {
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
}
|
|
|
|
/* ===== Custom Tooltip ===== */
|
|
.pill[data-tooltip] {
|
|
position: relative;
|
|
cursor: help;
|
|
}
|
|
.pill[data-tooltip]:hover::after {
|
|
content: attr(data-tooltip);
|
|
position: absolute;
|
|
top: calc(100% + 10px);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: #1a2432;
|
|
color: #e2e8f0;
|
|
font-size: 11px;
|
|
font-weight: 400;
|
|
font-family: "SF Mono","Fira Code","Cascadia Code","Consolas",monospace;
|
|
padding: 6px 12px;
|
|
border-radius: 6px;
|
|
border: 1px solid #2a3a4e;
|
|
box-shadow: 0 4px 16px rgba(0,0,0,.45);
|
|
white-space: nowrap;
|
|
z-index: 1000;
|
|
pointer-events: none;
|
|
animation: tooltipFadeIn .15s ease-out;
|
|
}
|
|
.pill[data-tooltip]:hover::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: calc(100% + 4px);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
border: 6px solid transparent;
|
|
border-bottom-color: #2a3a4e;
|
|
z-index: 1001;
|
|
pointer-events: none;
|
|
animation: tooltipFadeIn .15s ease-out;
|
|
}
|
|
@keyframes tooltipFadeIn {
|
|
from { opacity: 0; transform: translateX(-50%) translateY(3px); }
|
|
to { opacity: 1; transform: translateX(-50%) translateY(0); }
|
|
}
|
|
|
|
/* === RESPONSIVE === */
|
|
@media (max-width: 1100px) {
|
|
.main-layout { grid-template-columns: 1fr; }
|
|
.badge-grid { grid-template-columns: repeat(2, 1fr); }
|
|
}
|
|
@media (max-width: 640px) {
|
|
.container { padding: 16px; }
|
|
.header-bar { flex-direction: column; align-items: flex-start; }
|
|
.badge-grid, .metric-grid { grid-template-columns: 1fr; }
|
|
.status-kv-grid, .status-task-meta { grid-template-columns: 1fr; }
|
|
.can-grid { grid-template-columns: 1fr 1fr; }
|
|
.btn-row { flex-direction: column; }
|
|
}
|
|
|