mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-25 03:18:08 +00:00
fix(webui): 总览改静态骨架 + 图标 KPI,彻底去掉整页重建的闪烁
jianf:仍严重闪烁;应彻底摒弃增量重建,用动态图标 + api 数据展示;主页文字太多。 - renderOverview 从「每次 innerHTML 重建整页(含运行态面板)」改成**首帧建一次 静态骨架**,之后 renderAll(每 15s 一次)只 updateOverview —— 只写 textContent 与类名,一个节点都不重建。实测连续两次 renderAll 后 #ov-kpis / #ov-status / #rt-panel 仍是同一批 DOM 节点,这是"不再闪"的直接判据。 - 主页文字大幅收缩:删掉「系统概览 / LLM 状态 / 记忆状态 / 运行时」四张 kv 文字卡, 改成一排 8 个图标 KPI(状态/运行/插件/版本/LLM/记忆/文档/运行时),状态用彩色 圆点表达,其余只留数字 + 两字标签。 - 运行态面板不再被 renderOverview 清空(去掉 _rtSig=null 与重建),保持连续更新。
This commit is contained in:
@ -2740,3 +2740,74 @@
|
||||
border-color: var(--text-primary);
|
||||
box-shadow: 0 0 0 2px var(--accent-bg);
|
||||
}
|
||||
|
||||
/* ===== 总览 KPI(图标 + 数字,静态骨架)=====
|
||||
节点只在首帧建一次,刷新只改值与类名 —— 这是总览页不再闪的前提。 */
|
||||
.ov-kpis {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
.ov-kpi {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
padding: 12px 14px 11px;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-input);
|
||||
border: 1px solid var(--border-color);
|
||||
min-width: 0;
|
||||
}
|
||||
.ov-ico svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
fill: none;
|
||||
stroke: var(--accent);
|
||||
stroke-width: 1.7;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
display: block;
|
||||
}
|
||||
.ov-val {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
line-height: 1.15;
|
||||
min-width: 0;
|
||||
}
|
||||
.ov-val b {
|
||||
font-weight: 700;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.ov-lab {
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
.ov-dot {
|
||||
flex: 0 0 auto;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--text-muted);
|
||||
}
|
||||
.ov-dot.ok {
|
||||
background: var(--success);
|
||||
box-shadow: 0 0 8px rgba(23, 169, 100, 0.55);
|
||||
}
|
||||
.ov-dot.warn {
|
||||
background: var(--warning);
|
||||
}
|
||||
.ov-dot.bad {
|
||||
background: var(--error);
|
||||
}
|
||||
.ov-foot {
|
||||
margin-top: 10px;
|
||||
font-size: 11px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user