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.
This commit is contained in:
DrSmoothl committed 2026-07-16 21:46:15 +08:00
1 parent 5e0cbb026b
commit 9bdc6510bd
30 files changed
+151 -151

No files matched your search

@@ -170,7 +170,7 @@ export function ChangePasswordForm({
className="h-10 text-sm"
/>
{confirmPassword.length > 0 && !confirmMatches && (
<span className="text-[11px] text-destructive">两次输入的密码不一致</span>
<span className="text-xs text-destructive">两次输入的密码不一致</span>
)}
</div>
@@ -288,7 +288,7 @@ function HeaderBar({ selectedUin, dirty, saveStatus, saveStatusTone, onSave, act
</div>
<div className="flex flex-wrap items-center gap-3">
{(saveStatus || dirty) && (
<span className="inline-flex items-center gap-1.5 text-[11px] font-medium">
<span className="inline-flex items-center gap-1.5 text-xs font-medium">
{saveStatusTone === 'saving' ? (
<><Loader2 className="size-3.5 animate-spin text-muted-foreground" /><span className="text-muted-foreground">保存中</span></>
) : saveStatusTone === 'success' ? (
@@ -379,7 +379,7 @@ function TabStrip({ activeTab, onChange, counts }: TabStripProps) {
{count != null && (
<Badge
variant={active ? 'default' : 'secondary'}
className="h-4 px-1.5 font-mono text-[10px] tabular-nums"
className="h-4 px-1.5 font-mono text-micro tabular-nums"
>
{count}
</Badge>
@@ -111,7 +111,7 @@ export function ConsentPage({ documents, version, onAccept, onDecline }: Consent
</div>
{active && (active.declaredVersion || active.effectiveDate) && (
<p className="mt-2 text-[11px] text-muted-foreground">
<p className="mt-2 text-meta text-muted-foreground">
{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
</div>
</CardContent>
</Card>
<p className="mt-3 text-center text-[10px] text-muted-foreground/70">agreements {version.slice(0, 8)}</p>
<p className="mt-3 text-center text-micro text-muted-foreground/70">agreements {version.slice(0, 8)}</p>
</motion.div>
</div>
);
@@ -103,7 +103,7 @@ export function LoginPage({ onLogin }: LoginPageProps) {
<div>
<div className="flex items-center justify-center gap-2">
<span className="text-2xl font-semibold tracking-tight">{APP_NAME}</span>
<span className="rounded-full bg-primary/10 px-1.5 py-0.5 font-mono text-[10px] text-primary tabular-nums">v{APP_VERSION}</span>
<span className="rounded-full bg-primary/10 px-1.5 py-0.5 font-mono text-micro text-primary tabular-nums">v{APP_VERSION}</span>
</div>
<p className="mt-1 text-xs text-muted-foreground">OneBot v11 协议网关 · 安全登录</p>
</div>
@@ -155,7 +155,7 @@ export function LoginPage({ onLogin }: LoginPageProps) {
</Button>
</form>
<p className="mt-7 text-center text-[11px] text-muted-foreground">
<p className="mt-7 text-center text-meta text-muted-foreground">
© {new Date().getFullYear()} SnowLuma. All rights reserved.
</p>
</CardContent>
@@ -187,12 +187,12 @@ export function LoginPage({ onLogin }: LoginPageProps) {
<div className="flex items-center justify-between gap-4 rounded-xl border bg-muted/30 px-4 py-3">
<div className="min-w-0">
<p className="text-sm font-medium">登录页动态背景</p>
<p className="mt-0.5 text-[11px] text-muted-foreground">{fxOn ? '已开启 · 关闭后背景为静态' : '已关闭 · 背景为静态'}</p>
<p className="mt-0.5 text-xs text-muted-foreground">{fxOn ? '已开启 · 关闭后背景为静态' : '已关闭 · 背景为静态'}</p>
</div>
<ToggleSwitch value={fxOn} onChange={toggleFx} ariaLabel="登录页动态背景" />
</div>
<p className="text-[11px] leading-relaxed text-muted-foreground">
<p className="text-xs leading-relaxed text-muted-foreground">
登录后,你还可以在「系统设置 → 无障碍」里进一步「减弱动效」或「关闭全部动效」。
</p>
</DialogContent>
@@ -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() {
<div className="mb-2 flex flex-wrap items-center gap-x-1.5 gap-y-0.5">
<SlidersHorizontal className="size-3.5 text-muted-foreground" />
<span className="text-xs font-medium text-foreground">视图预设</span>
<span className="text-[10px] text-muted-foreground">· 一键套用级别 / 行数 / 换行;手动调整后变为「自定义」</span>
<span className="text-xs text-muted-foreground">· 一键套用级别 / 行数 / 换行;手动调整后变为「自定义」</span>
</div>
<div className="inline-flex flex-wrap gap-1 rounded-lg bg-muted/60 p-1">
{LOG_PRESETS.map((p) => {
@@ -487,7 +487,7 @@ export function LogsPage() {
aria-pressed={active}
title={p.hint}
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 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40',
'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 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40',
active ? 'bg-card text-foreground shadow-sm ring-1 ring-border/60' : 'text-muted-foreground/70 hover:text-foreground',
)}
>
@@ -497,7 +497,7 @@ export function LogsPage() {
})}
<span
className={cn(
'inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11px] font-medium',
'inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium',
prefs.preset === 'custom' ? 'bg-card text-foreground shadow-sm ring-1 ring-border/60' : 'text-muted-foreground/40',
)}
>
@@ -510,7 +510,7 @@ export function LogsPage() {
<div>
<div className="mb-2 flex flex-wrap items-center gap-x-1.5 gap-y-0.5">
<span className="text-xs font-medium text-foreground">服务端日志级别</span>
<span className="text-[10px] text-muted-foreground">· 仅影响控制台 / 实时流,文件始终落盘 debug</span>
<span className="text-xs text-muted-foreground">· 仅影响控制台 / 实时流,文件始终落盘 debug</span>
</div>
<div className="inline-flex flex-wrap gap-1 rounded-lg bg-muted/60 p-1">
{LEVELS.map((lv) => {
@@ -523,7 +523,7 @@ export function LogsPage() {
disabled={levelBusy || serverLevel === null}
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,opacity] duration-150 ease-out cursor-pointer disabled:cursor-not-allowed disabled:opacity-50',
'inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-[background-color,color,box-shadow,opacity] duration-150 ease-out cursor-pointer disabled:cursor-not-allowed disabled:opacity-50',
active
? cn('bg-card shadow-sm ring-1 ring-border/60', levelClass[lv])
: 'text-muted-foreground/70 hover:text-foreground',
@@ -542,7 +542,7 @@ export function LogsPage() {
<div className="mb-2 flex flex-wrap items-center gap-x-1.5 gap-y-0.5">
<Highlighter className="size-3.5 text-muted-foreground" />
<span className="text-xs font-medium text-foreground">高亮规则</span>
<span className="text-[10px] text-muted-foreground">· 命中关键词的行会被着色</span>
<span className="text-xs text-muted-foreground">· 命中关键词的行会被着色</span>
</div>
<div className="flex flex-wrap items-center gap-2">
<Input
@@ -578,7 +578,7 @@ export function LogsPage() {
{prefs.highlightRules.length > 0 && (
<div className="mt-2.5 flex flex-wrap gap-1.5">
{prefs.highlightRules.map((r, i) => (
<span key={i} className="inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px]" style={{ borderColor: colorSwatch(r.color) }}>
<span key={i} className="inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-meta" style={{ borderColor: colorSwatch(r.color) }}>
<span className="size-2 rounded-full" style={{ backgroundColor: colorSwatch(r.color) }} />
{r.keyword}
<button type="button" onClick={() => removeHighlight(i)} className="text-muted-foreground hover:text-destructive cursor-pointer" aria-label={`移除高亮规则 ${r.keyword}`}>
@@ -600,7 +600,7 @@ export function LogsPage() {
{/* Column header lives OUTSIDE the scroll viewport so the virtualizer's
scroll element contains only the rows (no sticky-offset math). */}
{filtered.length > 0 && (
<div className="hidden items-center gap-3 border-b border-border/60 bg-card/60 px-3 py-2 font-mono text-[10px] font-medium uppercase tracking-wider text-muted-foreground/70 sm:flex">
<div className="hidden items-center gap-3 border-b border-border/60 bg-card/60 px-3 py-2 font-mono text-micro font-medium uppercase tracking-wider text-muted-foreground/70 sm:flex">
<span className="w-[104px] shrink-0">时间</span>
<span className="w-[76px] shrink-0">级别</span>
<span className="w-28 shrink-0">模块</span>
@@ -665,7 +665,7 @@ export function LogsPage() {
title={prefs.wrap ? undefined : log.message}
>
{log.req !== undefined && (
<span className="mr-1.5 rounded bg-primary/10 px-1 text-[10px] text-primary tabular-nums" title="请求关联号">#{log.req}</span>
<span className="mr-1.5 rounded bg-primary/10 px-1 text-micro text-primary tabular-nums" title="请求关联号">#{log.req}</span>
)}
{log.message}
</span>
@@ -138,7 +138,7 @@ export function OverviewPage() {
</div>
{editing && (
<p className="rounded-xl border border-primary/20 bg-primary/5 px-3.5 py-2.5 text-[11px] leading-relaxed text-muted-foreground">
<p className="rounded-xl border border-primary/20 bg-primary/5 px-3.5 py-2.5 text-xs leading-relaxed text-muted-foreground">
{isWide
? '拖动卡片移动位置、拖右下角缩放,右上齿轮改设置;把卡片拖回右侧「部件库」即可移除,从部件库拖到画布即可添加。左侧导航也可在编辑态拖动排序。'
: '拖动手柄调整卡片顺序,眼睛图标显隐,齿轮改设置。手机为单列布局,与桌面网格各自独立。'}
@@ -159,7 +159,7 @@ export function OverviewPage() {
<p className="text-sm font-medium">
{loadableProcs > 0 ? `检测到 ${loadableProcs} 个可加载 QQ 进程` : '尚未接入任何账号'}
</p>
<p className="text-[11px] text-muted-foreground">
<p className="text-xs text-muted-foreground">
前往「进程注入」加载 QQ,登录后会自动接入 OneBot 流程。
</p>
</div>
@@ -329,11 +329,11 @@ function WidgetGallery({ hidden }: { hidden: UiLayoutItem[] }) {
<LayoutGrid className="size-3.5 text-primary" />
<span className="text-xs font-semibold">部件库</span>
</div>
<p className="mb-3 px-1 text-[11px] leading-snug text-muted-foreground">
<p className="mb-3 px-1 text-xs leading-snug text-muted-foreground">
拖到左侧画布添加;把卡片拖回此处即可移除。
</p>
{hidden.length === 0 ? (
<div className="rounded-lg border border-dashed px-2 py-8 text-center text-[11px] text-muted-foreground">
<div className="rounded-lg border border-dashed px-2 py-8 text-center text-xs text-muted-foreground">
全部部件已添加
</div>
) : (
@@ -480,9 +480,9 @@ function StatTile({
}) {
const copy = (
<>
<p className="truncate text-[11px] font-medium uppercase leading-tight tracking-wider text-muted-foreground">{label}</p>
<p className="truncate text-xs font-medium uppercase leading-tight tracking-wider text-muted-foreground">{label}</p>
<div className="mt-1 truncate text-lg font-semibold leading-tight tabular-nums">{value}</div>
{subtext && <p className="mt-1 truncate text-[11px] leading-tight text-muted-foreground">{subtext}</p>}
{subtext && <p className="mt-1 truncate text-xs leading-tight text-muted-foreground">{subtext}</p>}
</>
);
const body = (
@@ -617,7 +617,7 @@ function HostBlock({ config }: { config: HostConfig }) {
<Cpu className="size-4 text-primary" />
<span className="text-sm font-semibold">CPU 使用率</span>
{systemInfo && (
<span className="text-[11px] text-muted-foreground tabular-nums">{systemInfo.cpu.perCore.length} 核</span>
<span className="text-meta text-muted-foreground tabular-nums">{systemInfo.cpu.perCore.length} 核</span>
)}
</div>
<span className="text-sm font-semibold tabular-nums text-primary">
@@ -625,7 +625,7 @@ function HostBlock({ config }: { config: HostConfig }) {
</span>
</div>
<Progress value={systemInfo?.cpu.average ?? 0} />
<p className="mt-2 text-[11px] text-muted-foreground tabular-nums">
<p className="mt-2 text-meta text-muted-foreground tabular-nums">
负载: {systemInfo ? systemInfo.cpu.loadAvg.map((v) => v.toFixed(2)).join(' / ') : '—'}
</p>
{systemInfo && systemInfo.cpu.perCore.length > 0 && (
@@ -643,7 +643,7 @@ function HostBlock({ config }: { config: HostConfig }) {
}}
>
<span
className="text-[10px] leading-none tabular-nums"
className="text-micro leading-none tabular-nums"
style={{ color: 'color-mix(in oklab, var(--foreground) 55%, transparent)' }}
>
{i}
@@ -687,7 +687,7 @@ function HostBlock({ config }: { config: HostConfig }) {
/>
))}
</div>
<div className="mt-3 flex flex-wrap gap-x-3.5 gap-y-1 text-[11px] text-muted-foreground">
<div className="mt-3 flex flex-wrap gap-x-3.5 gap-y-1 text-meta text-muted-foreground">
{segs.map((seg) => (
<span key={seg.key} className="inline-flex items-center gap-1.5">
<i className="size-2 rounded-[2px]" style={{ background: seg.color }} />
@@ -791,7 +791,7 @@ function SessionsBlock({ config }: { config: SessionsConfig }) {
</Avatar>
<div className="min-w-0 flex-1">
<div className="truncate text-sm font-semibold">{q.nickname}</div>
<div className="truncate font-mono text-[11px] text-muted-foreground tabular-nums">{q.uin}</div>
<div className="truncate font-mono text-meta text-muted-foreground tabular-nums">{q.uin}</div>
</div>
<span className="size-2 shrink-0 animate-pulse rounded-full bg-success shadow-[0_0_8px_color-mix(in_oklab,var(--success)_60%,transparent)]" />
</motion.div>
@@ -873,25 +873,25 @@ function ConnectionsBlock({ config }: { config: ConnectionsConfig }) {
<div key={acc.uin} className="flex flex-col gap-2">
<div className="flex items-baseline gap-2">
<span className="text-sm font-semibold">{acc.nickname || acc.uin}</span>
<span className="font-mono text-[11px] text-muted-foreground tabular-nums">{acc.uin}</span>
<span className="font-mono text-meta text-muted-foreground tabular-nums">{acc.uin}</span>
</div>
{acc.adapters.length === 0 ? (
<p className="rounded-md border border-dashed px-3 py-2 text-[11px] text-muted-foreground">未配置任何协议端点</p>
<p className="rounded-md border border-dashed px-3 py-2 text-xs text-muted-foreground">未配置任何协议端点</p>
) : (
<div className="flex flex-col gap-1.5">
{acc.adapters.map((adp) => (
<div key={adp.name} className="flex items-center gap-2 rounded-xl border bg-card/40 px-3 py-2">
<span className={cn('shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium', CONN_STATUS_STYLE[adp.status])}>
<span className={cn('shrink-0 rounded px-1.5 py-0.5 text-micro font-medium', CONN_STATUS_STYLE[adp.status])}>
{CONN_STATUS_LABEL[adp.status]}
</span>
<div className="min-w-0 flex-1">
<div className="flex items-center gap-1.5">
<span className="truncate text-sm font-medium">{adp.name}</span>
<span className="shrink-0 text-[10px] text-muted-foreground">{ADAPTER_KIND_LABEL[adp.kind]}</span>
<span className="shrink-0 text-micro text-muted-foreground">{ADAPTER_KIND_LABEL[adp.kind]}</span>
</div>
<div className="truncate text-[11px] text-muted-foreground">{adp.detail}</div>
<div className="truncate text-meta text-muted-foreground">{adp.detail}</div>
{adp.lastError && adp.lastErrorAt && (
<div className="truncate text-[10px] text-destructive/80">
<div className="truncate text-xs text-destructive/80">
{new Date(adp.lastErrorAt).toLocaleString()} · {adp.lastError}
</div>
)}
@@ -946,7 +946,7 @@ function LinkWidget({ config }: { config: LinkConfig }) {
</div>
<div className="min-w-0 flex-1">
<p className="truncate text-sm font-semibold">{config.label || config.url}</p>
<p className="truncate text-[11px] text-muted-foreground">{config.url}</p>
<p className="truncate text-meta text-muted-foreground">{config.url}</p>
</div>
<ExternalLink className="size-4 shrink-0 text-muted-foreground/60" />
</CardContent>
@@ -977,7 +977,7 @@ function AccountWidget({ config }: { config: AccountConfig }) {
</Avatar>
<div className="min-w-0 flex-1">
<p className="truncate text-sm font-semibold">{acct?.nickname || '未接入账号'}</p>
<p className="truncate font-mono text-[11px] text-muted-foreground tabular-nums">{config.uin}</p>
<p className="truncate font-mono text-meta text-muted-foreground tabular-nums">{config.uin}</p>
</div>
<span
title={acct ? '在线' : '未接入'}
@@ -1037,7 +1037,7 @@ function RecentAlertsCard({ config }: { config: AlertsConfig }) {
</CardTitle>
<CardDescription>最近 {count} 条 · {config.levels.map((l) => l.toUpperCase()).join(' / ')}</CardDescription>
</div>
<Link to="/logs" className="inline-flex shrink-0 items-center gap-1 text-[11px] text-muted-foreground hover:text-foreground">
<Link to="/logs" className="inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground hover:text-foreground">
查看日志 <ArrowRight className="size-3" />
</Link>
</CardHeader>
@@ -1048,7 +1048,7 @@ function RecentAlertsCard({ config }: { config: AlertsConfig }) {
<p className="text-sm">暂无告警</p>
</div>
) : (
<div className="flex flex-col gap-1 font-mono text-[11px]">
<div className="flex flex-col gap-1 font-mono text-meta">
{alerts.map((a) => (
<div key={a.id} className="flex gap-2 rounded px-2 py-1 hover:bg-accent/30">
<span className="shrink-0 text-muted-foreground tabular-nums">{formatClock(a.time)}</span>
@@ -85,7 +85,7 @@ export function ProcessesPage() {
aria-checked={active}
onClick={() => setPages({ processesSort: o.id })}
className={cn(
'rounded-md px-2.5 py-1 text-[11px] font-medium transition-[background-color,color,box-shadow] duration-150 ease-out cursor-pointer outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40',
'rounded-md px-2.5 py-1 text-xs font-medium transition-[background-color,color,box-shadow] duration-150 ease-out cursor-pointer outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40',
active ? 'bg-card font-semibold text-foreground shadow-sm ring-1 ring-border' : 'text-muted-foreground hover:text-foreground',
)}
>
@@ -115,7 +115,7 @@ export function ProcessesPage() {
<div className="flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed py-16 text-muted-foreground">
<Cpu className="size-8 opacity-40" strokeWidth={1.5} />
<p className="text-sm">未检测到可加载 QQ 主进程</p>
<p className="text-[11px] text-muted-foreground/80">请确认 QQ 已启动后点击右上角刷新</p>
<p className="text-xs text-muted-foreground/80">请确认 QQ 已启动后点击右上角刷新</p>
</div>
) : (
<div className="grid grid-cols-1 gap-3 xl:grid-cols-2 2xl:grid-cols-3">
@@ -167,17 +167,17 @@ export function ProcessesPage() {
{processStatusLabel[proc.status]}
</Badge>
</div>
<div className="mt-0.5 truncate font-mono text-[11px] text-muted-foreground tabular-nums">
<div className="mt-0.5 truncate font-mono text-meta text-muted-foreground tabular-nums">
PID {proc.pid}
{proc.uin && proc.uin !== '0' ? ` · UIN ${proc.uin}` : ''}
</div>
{proc.path && (
<div className="truncate text-[11px] text-muted-foreground/80" title={proc.path}>
<div className="truncate text-meta text-muted-foreground/80" title={proc.path}>
{proc.path}
</div>
)}
{proc.error && (
<div className="mt-0.5 truncate text-[11px] text-destructive" title={proc.error}>
<div className="mt-0.5 truncate text-xs text-destructive" title={proc.error}>
{proc.error}
</div>
)}
@@ -137,7 +137,7 @@ function SettingsNav({ tab, onChange }: { tab: SettingsTab; onChange: (t: Settin
<p
id={`settings-nav-group-${gi}`}
className={cn(
'hidden select-none px-3 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/60 lg:block',
'hidden select-none px-3 pb-0.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground/60 lg:block',
gi === 0 ? 'lg:pt-1' : 'lg:pt-3',
)}
>
@@ -404,7 +404,7 @@ function AppearancePanel() {
))}
</span>
</span>
<span className="text-[11px] font-medium">{p.label}</span>
<span className="text-xs font-medium">{p.label}</span>
</button>
);
})}
@@ -499,7 +499,7 @@ function AppearancePanel() {
</SettingRow>
<SettingRow label={`界面缩放(${Math.round(a.uiScale * 100)}%)`} hint="整体放大或缩小界面,适合高分屏或视力需要。" layout="stack">
<div className="flex items-center gap-3">
<span className="text-[11px] text-muted-foreground tabular-nums">{Math.round(UI_SCALE.min * 100)}%</span>
<span className="text-meta text-muted-foreground tabular-nums">{Math.round(UI_SCALE.min * 100)}%</span>
<Slider
min={UI_SCALE.min}
max={UI_SCALE.max}
@@ -509,7 +509,7 @@ function AppearancePanel() {
className="flex-1"
aria-label="界面缩放"
/>
<span className="text-[11px] text-muted-foreground tabular-nums">{Math.round(UI_SCALE.max * 100)}%</span>
<span className="text-meta text-muted-foreground tabular-nums">{Math.round(UI_SCALE.max * 100)}%</span>
</div>
</SettingRow>
<SettingRow label="显示密度">
@@ -755,7 +755,7 @@ function FontField({
{fonts.map((f) => <option key={f} value={f} />)}
</datalist>
)}
<p className="text-[11px] leading-snug text-muted-foreground">
<p className="text-xs leading-snug text-muted-foreground">
{canQuery
? '可输入字体名称,或聚焦后从已安装字体中选择;找不到时回退到系统字体。'
: '输入已安装的字体名称(可写多个,用逗号分隔);找不到时回退到系统字体。'}
@@ -804,12 +804,12 @@ function ThemeVarsPanel({
{CSS_VAR_FIELDS.map((f) => {
const override = cssVars[f.token];
return (
<SettingRow key={f.token} label={f.label} hint={<code className="font-mono text-[11px]">{f.token}</code>} layout="inline">
<SettingRow key={f.token} label={f.label} hint={<code className="font-mono text-meta">{f.token}</code>} layout="inline">
<div className="flex items-center gap-2.5">
{override ? (
<span className="font-mono text-[11px] text-muted-foreground tabular-nums">{override}</span>
<span className="font-mono text-meta text-muted-foreground tabular-nums">{override}</span>
) : (
<span className="text-[11px] text-muted-foreground">默认</span>
<span className="text-meta text-muted-foreground">默认</span>
)}
<label
title="选择颜色"
@@ -839,7 +839,7 @@ function ThemeVarsPanel({
})}
{count > 0 && (
<div className="flex items-center justify-between gap-4 px-5 py-3">
<span className="text-[11px] text-muted-foreground">已覆盖 {count} 个变量</span>
<span className="text-meta text-muted-foreground">已覆盖 {count} 个变量</span>
<Button variant="ghost" size="sm" onClick={() => onChange({})} className="text-destructive hover:text-destructive">
<RotateCcw className="size-4" /> 全部恢复默认
</Button>
@@ -1009,18 +1009,18 @@ function AdvancedPanel() {
<CardTitle className="flex items-center gap-2 text-[15px]"><Code2 className="size-4 text-primary" /> 自定义 CSS</CardTitle>
<CardDescription className="text-[12px] leading-relaxed">
高级用户可注入自定义样式,登录后全局生效(登录页不受影响)。
若改坏了界面,在地址后加 <code className="rounded bg-muted px-1 py-0.5 font-mono text-[11px]">?safe-mode=1</code> 可临时禁用自定义 CSS 进来修复。
若改坏了界面,在地址后加 <code className="rounded bg-muted px-1 py-0.5 font-mono text-meta">?safe-mode=1</code> 可临时禁用自定义 CSS 进来修复。
</CardDescription>
</CardHeader>
<CardContent className="flex flex-col gap-3">
<div className="flex flex-wrap items-center gap-1.5">
<span className="mr-1 text-[11px] text-muted-foreground">插入模板:</span>
<span className="mr-1 text-xs text-muted-foreground">插入模板:</span>
{CSS_SNIPPETS.map((s) => (
<button
key={s.label}
type="button"
onClick={() => insertSnippet(s.css)}
className="inline-flex items-center gap-1 rounded-md border bg-muted/40 px-2 py-1 text-[11px] font-medium text-muted-foreground transition-colors cursor-pointer outline-none hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/40"
className="inline-flex items-center gap-1 rounded-md border bg-muted/40 px-2 py-1 text-xs font-medium text-muted-foreground transition-colors cursor-pointer outline-none hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/40"
>
<Plus className="size-3" /> {s.label}
</button>
@@ -1037,12 +1037,12 @@ function AdvancedPanel() {
className="h-64 resize-y rounded-lg bg-card/40 p-3 font-mono text-[12px] leading-relaxed"
/>
{cssWarn && (
<p className="flex items-start gap-1.5 text-[11px] text-warning">
<p className="flex items-start gap-1.5 text-xs text-warning">
<AlertTriangle className="mt-px size-3.5 shrink-0" /> {cssWarn}
</p>
)}
<div className="flex items-center justify-between gap-2">
<span className="text-[11px] text-muted-foreground">{appearance.customCss.length} / 50000 字符</span>
<span className="text-meta text-muted-foreground">{appearance.customCss.length} / 50000 字符</span>
<Button
variant="ghost"
size="sm"
@@ -1075,7 +1075,7 @@ function AdvancedPanel() {
</Button>
</div>
{msg && (
<span className={cn('text-[11px]', msg.kind === 'ok' ? 'text-success' : 'text-destructive')}>{msg.text}</span>
<span className={cn('text-xs', msg.kind === 'ok' ? 'text-success' : 'text-destructive')}>{msg.text}</span>
)}
</CardContent>
</Card>
@@ -1172,19 +1172,19 @@ function UpdateGroup() {
<Sparkles className="size-4 text-primary" />
<span className="text-sm font-medium">v{latest}</span>
{updateInfo.publishedAt && (
<span className="ml-auto text-[11px] tabular-nums text-muted-foreground">
<span className="ml-auto text-meta tabular-nums text-muted-foreground">
{new Date(updateInfo.publishedAt).toLocaleDateString()}
</span>
)}
</div>
<p className="mt-1 text-[11px] text-muted-foreground">当前 v{updateInfo.current} → 最新 v{latest}</p>
<p className="mt-1 text-xs text-muted-foreground">当前 v{updateInfo.current} → 最新 v{latest}</p>
{updateInfo.notes && (
<pre className="mt-3 max-h-40 overflow-auto whitespace-pre-wrap rounded-lg bg-muted/50 p-3 text-[11px] leading-relaxed text-muted-foreground">
<pre className="mt-3 max-h-40 overflow-auto whitespace-pre-wrap rounded-lg bg-muted/50 p-3 text-xs leading-relaxed text-muted-foreground">
{updateInfo.notes}
</pre>
)}
{hint && (
<p className="mt-3 text-[11px] text-muted-foreground">
<p className="mt-3 text-xs text-muted-foreground">
适合你的平台:<code className="rounded bg-muted px-1 py-0.5 font-mono">{hint}</code>(在下载页选择)
</p>
)}
@@ -1238,7 +1238,7 @@ function AboutPanel() {
</div>
<div className="flex items-center gap-2">
<span className="text-2xl font-semibold tracking-tight">SnowLuma</span>
<span className="rounded-full border border-primary/30 bg-primary/10 px-2 py-0.5 font-mono text-[11px] text-primary tabular-nums">
<span className="rounded-full border border-primary/30 bg-primary/10 px-2 py-0.5 font-mono text-meta text-primary tabular-nums">
v{__APP_VERSION__}
</span>
</div>
@@ -1259,7 +1259,7 @@ function AboutPanel() {
<Star className="size-7 fill-primary/15 text-primary" />
<div className="flex flex-col items-center gap-1">
<p className="text-sm font-medium">喜欢 SnowLuma?给个 Star 支持一下</p>
<p className="max-w-xs text-[11px] leading-relaxed text-muted-foreground">
<p className="max-w-xs text-xs leading-relaxed text-muted-foreground">
开源不易,你的 ⭐ 是我们持续维护的最大动力。
</p>
</div>
@@ -86,7 +86,7 @@ export function ErrorPage({ error, reset }: { error?: Error; reset?: () => void
<Home className="size-4" /> 返回首页
</Button>
{message && (
<pre className="mt-3 max-h-32 w-full overflow-auto rounded-md border bg-muted/40 px-3 py-2 text-left text-[11px] leading-relaxed text-muted-foreground whitespace-pre-wrap">
<pre className="mt-3 max-h-32 w-full overflow-auto rounded-md border bg-muted/40 px-3 py-2 text-left text-meta leading-relaxed text-muted-foreground whitespace-pre-wrap">
{message}
</pre>
)}
@@ -181,7 +181,7 @@ export function NoteConfigForm({ config, onChange }: FormProps) {
placeholder="写点备注、待办或快捷信息…"
className="h-40 resize-y rounded-lg bg-card/40 p-3 text-sm leading-relaxed"
/>
<span className="text-right text-[11px] text-muted-foreground">{c.text.length} / {NOTE_MAX}</span>
<span className="text-right text-meta text-muted-foreground">{c.text.length} / {NOTE_MAX}</span>
</div>
);
}
@@ -204,7 +204,7 @@ export function LinkConfigForm({ config, onChange }: FormProps) {
onChange={(e) => onChange({ url: e.target.value })}
className={cn('h-8', urlInvalid && 'border-destructive')}
/>
{urlInvalid && <span className="text-[11px] text-destructive">仅支持 http:// 或 https:// 链接</span>}
{urlInvalid && <span className="text-xs text-destructive">仅支持 http:// 或 https:// 链接</span>}
</label>
<div className="flex flex-col gap-1.5">
<span className="text-sm text-muted-foreground">图标</span>
@@ -259,7 +259,7 @@ export function AccountConfigForm({ config, onChange }: FormProps) {
<datalist id={listId}>
{qqList.map((q) => <option key={q.uin} value={q.uin}>{q.nickname || q.uin}</option>)}
</datalist>
<span className="text-[11px] text-muted-foreground">可从已接入账号中选择,或手动输入。</span>
<span className="text-xs text-muted-foreground">可从已接入账号中选择,或手动输入。</span>
</div>
);
}