From 8f61b1486e24266e91d35642fbca8d3c00e01d48 Mon Sep 17 00:00:00 2001
From: DrSmoothl <1787882683@qq.com>
Date: Sun, 14 Jun 2026 16:20:19 +0800
Subject: [PATCH] feat(webui): Apple-style overview pass + roomier stat tiles
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Grid row height 80→108px so a 1-row stat tile's icon + 3 text lines clear
the padding with real breathing room (the previous fix still clipped ~8px);
stat tile gets an airier layout (size-10 icon, text-lg value, py-3.5).
- Carry the app's Apple language across the homepage: inner surfaces and
empty-state containers round to xl, empty-state icons calm to size-8/opacity,
edit hint + first-run nudge rounded consistently.
---
.../src/components/pages/overview-page.tsx | 36 +++++++++----------
packages/webui/src/lib/dashboard-layout.ts | 7 ++--
2 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/packages/webui/src/components/pages/overview-page.tsx b/packages/webui/src/components/pages/overview-page.tsx
index 30ce82e1..1d741ce9 100644
--- a/packages/webui/src/components/pages/overview-page.tsx
+++ b/packages/webui/src/components/pages/overview-page.tsx
@@ -94,7 +94,7 @@ export function OverviewPage() {
)}
{editing && (
-
+
拖动卡片顶部的「拖动」手柄移动位置、拖右下角缩放;眼睛图标显隐、齿轮改设置。左侧导航也可在编辑态拖动排序。
)}
@@ -106,7 +106,7 @@ export function OverviewPage() {
to="/processes"
className="flex items-center gap-3 rounded-xl border border-primary/30 bg-primary/5 px-4 py-3 transition-colors hover:bg-primary/10"
>
-
+
@@ -154,7 +154,7 @@ export function OverviewPage() {
function EmptyLayout({ onReset }: { onReset: () => void }) {
return (
@@ -174,10 +174,10 @@ function StatTile({
to?: AppPath;
}) {
const body = (
-
+
@@ -185,8 +185,8 @@ function StatTile({
{label}
-
{value}
- {subtext &&
{subtext}
}
+
{value}
+ {subtext &&
{subtext}
}
{to && }
@@ -283,7 +283,7 @@ function HostBlock() {
{/* CPU */}
-
+
@@ -308,7 +308,7 @@ function HostBlock() {
)}
{/* Memory */}
-
+
@@ -325,7 +325,7 @@ function HostBlock() {
{/* Runtime */}
-
+
@@ -390,8 +390,8 @@ function SessionsBlock({ config }: { config: SessionsConfig }) {
{list.length === 0 ? (
-
-
+
+
{qqList.length === 0 ? '暂无在线会话' : '无匹配的会话'}
) : (
@@ -404,7 +404,7 @@ function SessionsBlock({ config }: { config: SessionsConfig }) {
animate={{ opacity: 1, y: 0 }}
transition={off ? { duration: 0 } : { delay: 0.03 + idx * 0.04, duration: 0.22 }}
whileHover={off ? undefined : { y: -2 }}
- className="flex items-center gap-3 rounded-lg border bg-card/40 p-3"
+ className="flex items-center gap-3 rounded-xl border bg-card/40 p-3"
>
@@ -452,8 +452,8 @@ function ConnectionsBlock() {
{connections.length === 0 ? (
-
-
+
) : (
@@ -469,7 +469,7 @@ function ConnectionsBlock() {
) : (
{acc.adapters.map((adp) => (
-
+
{CONN_STATUS_LABEL[adp.status]}
@@ -545,8 +545,8 @@ function RecentAlertsCard({ config }: { config: AlertsConfig }) {
{alerts.length === 0 ? (
-
-
+
) : (
diff --git a/packages/webui/src/lib/dashboard-layout.ts b/packages/webui/src/lib/dashboard-layout.ts
index b0adb903..1973d730 100644
--- a/packages/webui/src/lib/dashboard-layout.ts
+++ b/packages/webui/src/lib/dashboard-layout.ts
@@ -6,8 +6,11 @@ import type { LogLevel, UiLayoutItem } from '@/types';
// (render + min sizes), and the layout editor (labels) without import cycles.
export const GRID_COLS = 12;
-/** px per grid row. Tiles are 1 row; cards a few rows. */
-export const GRID_CELL_HEIGHT = 80;
+/** px per grid row. Tiles are 1 row; cards a few rows. Sized so a 1-row stat
+ * tile's icon + 3 text lines (label + text-lg value + subtext) clear the
+ * py-3.5 padding with breathing room: item content ≈ cellHeight − 2·margin −
+ * card border ≈ 90px > the ~86px the content needs. */
+export const GRID_CELL_HEIGHT = 108;
export const GRID_MARGIN = 8;
export interface GridWidgetSpec {