feat(webui): apply Apple-style polish to processes + config pages

Carry the logs/settings visual language across the remaining pages:

- Processes: sort control becomes a segmented radiogroup; action banner
  gains a spinner; cards round to xl with a hover tint; calmer empty state.
- Config: save status collapses from bordered pills into one inline
  dot/spinner indicator; node summary rows round to xl with hover and
  fold the three flag badges into a single muted "数组 · 不上报自身 · 已设
  Token" line; empty states round to xl; account rail rounds to xl.

Presentational only — all state wiring and handlers unchanged.
This commit is contained in:
DrSmoothl committed 2026-06-13 23:25:11 +08:00
1 parent 3d480fb018
commit de598242ab
4 files changed
+50 -61

No files matched your search

@@ -8,7 +8,7 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { motion } from 'motion/react';
import { MousePointerClick, Plus, Save } from 'lucide-react';
import { Check, Loader2, MousePointerClick, Plus, Save } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Skeleton } from '@/components/ui/skeleton';
import { Badge } from '@/components/ui/badge';
@@ -276,24 +276,18 @@ function HeaderBar({ selectedUin, dirty, saveStatus, onSave, activeTab, onCreate
UIN {selectedUin}
</code>
</div>
<div className="flex flex-wrap items-center gap-2">
{saveStatus && (
<span
className={cn(
'rounded-full border px-2.5 py-1 text-[11px] font-medium',
saveStatus === '保存成功' && 'border-success/30 bg-success/10 text-success',
saveStatus === '保存中...' && 'border-border bg-muted text-muted-foreground',
saveStatus !== '保存成功' &&
saveStatus !== '保存中...' &&
'border-destructive/30 bg-destructive/10 text-destructive',
<div className="flex flex-wrap items-center gap-3">
{(saveStatus || dirty) && (
<span className="inline-flex items-center gap-1.5 text-[11px] font-medium">
{saveStatus === '保存中...' ? (
<><Loader2 className="size-3.5 animate-spin text-muted-foreground" /><span className="text-muted-foreground">保存中</span></>
) : saveStatus === '保存成功' ? (
<><Check className="size-3.5 text-success" /><span className="text-success">已保存</span></>
) : saveStatus ? (
<><span className="size-1.5 rounded-full bg-destructive" /><span className="text-destructive">{saveStatus}</span></>
) : (
<><span className="size-1.5 rounded-full bg-warning" /><span className="text-warning">未保存</span></>
)}
>
{saveStatus}
</span>
)}
{dirty && !saveStatus && (
<span className="rounded-full border border-warning/30 bg-warning/10 px-2.5 py-1 text-[11px] font-medium text-warning">
未保存
</span>
)}
{onCreate && (
@@ -410,7 +404,7 @@ function NetworkTabView({
if (list.length === 0) {
return (
<div className="flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed py-16 text-muted-foreground">
<div className="flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed py-16 text-muted-foreground">
<p className="text-sm">暂无 {tab.title} 节点</p>
<Button variant="outline" size="sm" onClick={onCreateClick}>
<Plus className="size-3.5" /> 创建第一个
@@ -447,8 +441,8 @@ function NetworkTabView({
function EmptyState() {
return (
<div className="flex h-64 flex-col items-center justify-center gap-2 rounded-lg border border-dashed text-muted-foreground">
<MousePointerClick className="size-7" strokeWidth={1.5} />
<div className="flex h-64 flex-col items-center justify-center gap-2 rounded-xl border border-dashed text-muted-foreground">
<MousePointerClick className="size-8 opacity-40" strokeWidth={1.5} />
<p className="text-sm">请在左栏选择会话以配置通信节点</p>
</div>
);