feat(ui): redesign the overview page as a trend-first command deck

Replace the ten-small-cards overview with an action bar, four vitals
tiles carrying 72-sample sparklines seeded from /server/history, a
two-series throughput chart, a TCP/UDP connections chart, and a
grouped system strip (uptime xray|os, panel ram|threads, ip
addresses). StatusCard and XrayStatusCard are deleted; every modal
stays reachable from the action bar, the Xray error message moves
into a tooltip on the state pill, and the panel version text keeps
opening the update modal (the dev-channel switch lives there) even
when no update is available. Live values sit beside the
upload/download and tcp/udp legends, a health sentence appears only
when a vital crosses the shared warn/crit thresholds now exported
from models/status, and load average is left to System History.

The sidebar becomes an auto-collapsed 72px icon rail that expands as
an overlay on hover: rail width, brand-row height and menu paddings
are pinned so nothing shifts during the transition, the collapsed-menu
tooltips are disabled, hover state survives the per-page sidebar
remounts (with a matches(':hover') resync), and the manual collapse
trigger is gone.

Sparkline gains rgb()/rgba() support in its fill gradient, a
showLegend prop so pages stop reaching into its internals, and loses
a dependency-less repaint effect that doubled canvas paints. Chart
tooltips show clock time via the new TimeFormatter.formatClock;
accents come from theme tokens instead of status.cpu.color. Verified
by screenshot at 390/800/1150/1280/1400/1600px in light and dark,
en and fa-IR, plus programmatic geometry checks on the sidebar.
Locale files gain 8 keys and lose 9 dead ones across all 13
languages.
This commit is contained in:
Sanaei
2026-07-29 20:17:37 +02:00
parent 87ebcc7a6f
commit c3fa73d5a0
30 changed files with 1467 additions and 765 deletions
+12 -8
View File
@@ -106,7 +106,6 @@
"routing": "路由",
"outbounds": "出站",
"apiDocs": "API 文档",
"link": "管理",
"donate": "捐赠",
"hosts": "主机",
"docs": "文档",
@@ -127,12 +126,9 @@
},
"index": {
"cpu": "CPU",
"logicalProcessors": "逻辑处理器",
"frequency": "频率",
"swap": "交换空间",
"storage": "存储",
"memory": "内存",
"threads": "线程",
"xrayStatus": "Xray",
"stopXray": "停止",
"restartXray": "重启",
@@ -153,7 +149,6 @@
"xrayStatusRunning": "运行中",
"xrayStatusStop": "停止",
"xrayStatusError": "错误",
"operationHours": "系统正常运行时间",
"systemHistoryTitle": "系统历史",
"historyTitleCpu": "CPU 使用率",
"historyTitleMem": "内存使用率",
@@ -171,7 +166,6 @@
"historyTabLoad": "负载",
"historyTabConnections": "连接数",
"historyTabDiskUsage": "磁盘使用量",
"charts": "图表",
"xrayMetricsTitle": "Xray 指标",
"xrayTitleHeap": "已分配的堆内存",
"xrayTitleSys": "向操作系统保留的内存",
@@ -200,7 +194,6 @@
"overallSpeed": "整体速度",
"upload": "上传",
"download": "下载",
"totalData": "总数据",
"sent": "已发送",
"received": "已接收",
"xraySwitchVersionDialog": "您确定要更改 Xray 版本吗?",
@@ -250,7 +243,18 @@
"exportDatabasePgDesc": "点击将当前数据库的 PostgreSQL 转储(.dump)下载到您的设备。",
"importDatabasePgDesc": "点击选择并上传 PostgreSQL 备份(.dump)、SQLite 数据库(.db)或 SQLite 迁移导出文件以恢复您的数据库。此操作将替换所有当前数据。",
"migrationDownload": "下载迁移文件",
"migrationDownloadPgDesc": "点击下载由 PostgreSQL 数据构建的 .db SQLite 数据库,可用于在 SQLite 上运行本面板。"
"migrationDownloadPgDesc": "点击下载由 PostgreSQL 数据构建的 .db SQLite 数据库,可用于在 SQLite 上运行本面板。",
"avg": "均值",
"peak": "峰值",
"free": "剩余",
"openSockets": "打开的套接字",
"throughputSub": "网卡总计",
"avgWindow": "窗口均值",
"healthWarm": "{list} — 偏高",
"healthCritical": "{list} — 危险",
"panel": "面板",
"threads": "线程",
"uptime": "运行时间"
},
"inbounds": {
"totalDownUp": "总上传 / 下载",