From 9bdc6510bd9405e8ecc86b835723a456f54706fb Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Thu, 16 Jul 2026 21:46:15 +0800 Subject: [PATCH] fix(webui): clarify compact text hierarchy Replace 145 scattered 10px and 11px declarations with semantic text roles across the dashboard, configuration, diagnostics, logs, and settings surfaces. Promote instructions, errors, interactive labels, and empty states to at least 12px, raise security-sensitive and destructive warnings to 14px, and make general-purpose badges readable by default. Keep compact sizing only for dense technical metadata such as timestamps, identifiers, paths, versions, and counters. Preserve the existing desktop density while improving Chinese text legibility and responsive behavior on narrow mobile layouts. --- .../src/components/config/account-sidebar.tsx | 4 +- .../config/general-settings-tab.tsx | 8 ++-- .../components/config/node-edit-dialog.tsx | 8 ++-- .../components/config/node-summary-card.tsx | 4 +- .../components/config/notification-opt-in.tsx | 18 ++++---- .../src/components/debug/action-tester.tsx | 24 +++++------ .../src/components/debug/file-source.tsx | 6 +-- .../src/components/debug/live-activity.tsx | 10 ++--- .../src/components/debug/message-builder.tsx | 12 +++--- .../webui/src/components/debug/task-badge.tsx | 4 +- .../webui/src/components/layout/sidebar.tsx | 14 +++---- .../components/overview/deliveries-widget.tsx | 4 +- .../components/pages/change-password-form.tsx | 2 +- .../src/components/pages/config-page.tsx | 4 +- .../src/components/pages/consent-page.tsx | 4 +- .../webui/src/components/pages/login-page.tsx | 8 ++-- .../webui/src/components/pages/logs-page.tsx | 20 ++++----- .../src/components/pages/overview-page.tsx | 42 +++++++++---------- .../src/components/pages/processes-page.tsx | 10 ++--- .../src/components/pages/settings-page.tsx | 42 +++++++++---------- .../src/components/pages/status-screens.tsx | 2 +- .../components/pages/widget-config-forms.tsx | 6 +-- .../settings/global-config-panel.tsx | 8 ++-- .../settings/notification-channel-dialog.tsx | 8 ++-- .../settings/notifications-panel.tsx | 6 +-- .../src/components/settings/system-panel.tsx | 12 +++--- packages/webui/src/components/ui/badge.tsx | 2 +- .../webui/src/components/ui/json-tree.tsx | 6 +-- packages/webui/src/components/ui/picker.tsx | 2 +- packages/webui/src/components/ui/tabs.tsx | 2 +- 30 files changed, 151 insertions(+), 151 deletions(-) diff --git a/packages/webui/src/components/config/account-sidebar.tsx b/packages/webui/src/components/config/account-sidebar.tsx index 7d066eb9..36f43f7d 100644 --- a/packages/webui/src/components/config/account-sidebar.tsx +++ b/packages/webui/src/components/config/account-sidebar.tsx @@ -88,7 +88,7 @@ export function AccountSidebar({ > {q.nickname || q.uin} -
+
收到纯文本 #sl 时回复 SnowLuma 版本 / 平台 / 运行时长。任何人可触发,关闭后完全不响应。
+
自定义触发词,默认 #sl。最长 32 字符,匹配前会去除首尾空格并转为小写。
+
开启后,命中的 #sl 不再投递给已连接的 Bot(仍会回复并本地记录)。默认关闭即透传。
+
同一会话在该秒数内重复 #sl 不再回复,防刷屏。0 表示不限制。
+
关闭后保存即可保留配置但不启动该节点
{desc}
} + {desc &&{desc}
}{error}
} + {error &&{error}
} ); } diff --git a/packages/webui/src/components/config/node-summary-card.tsx b/packages/webui/src/components/config/node-summary-card.tsx index 35699d8c..c3d6dde2 100644 --- a/packages/webui/src/components/config/node-summary-card.tsx +++ b/packages/webui/src/components/config/node-summary-card.tsx @@ -75,7 +75,7 @@ export function NodeSummaryCard还没有全局渠道——先到「设置 → 通知」添加。
+还没有全局渠道——先到「设置 → 通知」添加。
) : ( <> {/* collapsed: selected channels as removable chips */} {!expanded && (selectedCount === 0 ? ( -未选择任何渠道。展开以选择。
+未选择任何渠道。展开以选择。
) : (+
该账号上线 / 下线时向选中的渠道推送通知。渠道在「设置 → 通知」中全局定义。
@@ -172,21 +172,21 @@ export function NotificationOptIn({ selectedIds, onChange }: NotificationOptInPr无匹配渠道
+无匹配渠道
) : ({ch.url}
+{ch.url}
{doc.returns}> : null}
+ ? {doc.returns}> : null}
约束:{doc!.invariants.join(';')}
+约束:{doc!.invariants.join(';')}
)}{value}
暂无投递记录
+
{active.declaredVersion && `版本 / Version ${active.declaredVersion}`} {active.declaredVersion && active.effectiveDate && ' · '} {active.effectiveDate && `生效 / Effective ${active.effectiveDate}`} @@ -172,7 +172,7 @@ export function ConsentPage({ documents, version, onAccept, onDecline }: Consent
agreements {version.slice(0, 8)}
+agreements {version.slice(0, 8)}
); diff --git a/packages/webui/src/components/pages/login-page.tsx b/packages/webui/src/components/pages/login-page.tsx index ca7382e3..80471a15 100644 --- a/packages/webui/src/components/pages/login-page.tsx +++ b/packages/webui/src/components/pages/login-page.tsx @@ -103,7 +103,7 @@ export function LoginPage({ onLogin }: LoginPageProps) {OneBot v11 协议网关 · 安全登录
+
© {new Date().getFullYear()} SnowLuma. All rights reserved.
@@ -187,12 +187,12 @@ export function LoginPage({ onLogin }: LoginPageProps) {登录页动态背景
-{fxOn ? '已开启 · 关闭后背景为静态' : '已关闭 · 背景为静态'}
+{fxOn ? '已开启 · 关闭后背景为静态' : '已关闭 · 背景为静态'}
+
登录后,你还可以在「系统设置 → 无障碍」里进一步「减弱动效」或「关闭全部动效」。
diff --git a/packages/webui/src/components/pages/logs-page.tsx b/packages/webui/src/components/pages/logs-page.tsx index 7000aa14..dfada8f8 100644 --- a/packages/webui/src/components/pages/logs-page.tsx +++ b/packages/webui/src/components/pages/logs-page.tsx @@ -443,7 +443,7 @@ export function LogsPage() { onClick={() => toggleLevel(lv)} aria-pressed={active} className={cn( - 'inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11px] font-medium transition-[background-color,color,box-shadow] duration-150 ease-out cursor-pointer', + 'inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-[background-color,color,box-shadow] duration-150 ease-out cursor-pointer', active ? cn('bg-card shadow-sm ring-1 ring-border/60', levelClass[lv]) : 'text-muted-foreground/55 hover:text-foreground', @@ -474,7 +474,7 @@ export function LogsPage() {+
{isWide ? '拖动卡片移动位置、拖右下角缩放,右上齿轮改设置;把卡片拖回右侧「部件库」即可移除,从部件库拖到画布即可添加。左侧导航也可在编辑态拖动排序。' : '拖动手柄调整卡片顺序,眼睛图标显隐,齿轮改设置。手机为单列布局,与桌面网格各自独立。'} @@ -159,7 +159,7 @@ export function OverviewPage() {
{loadableProcs > 0 ? `检测到 ${loadableProcs} 个可加载 QQ 进程` : '尚未接入任何账号'}
-+
前往「进程注入」加载 QQ,登录后会自动接入 OneBot 流程。
+
拖到左侧画布添加;把卡片拖回此处即可移除。
{hidden.length === 0 ? ( -{label}
+{label}
{subtext}
} + {subtext &&{subtext}
} > ); const body = ( @@ -617,7 +617,7 @@ function HostBlock({ config }: { config: HostConfig }) {+
负载: {systemInfo ? systemInfo.cpu.loadAvg.map((v) => v.toFixed(2)).join(' / ') : '—'}
{systemInfo && systemInfo.cpu.perCore.length > 0 && ( @@ -643,7 +643,7 @@ function HostBlock({ config }: { config: HostConfig }) { }} > {i} @@ -687,7 +687,7 @@ function HostBlock({ config }: { config: HostConfig }) { /> ))}未配置任何协议端点
+未配置任何协议端点
) : ({config.label || config.url}
-{config.url}
+{config.url}
{acct?.nickname || '未接入账号'}
-{config.uin}
+{config.uin}
暂无告警
未检测到可加载 QQ 主进程
-请确认 QQ 已启动后点击右上角刷新
+请确认 QQ 已启动后点击右上角刷新