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 {