fix(web): 控制台界面细节与 uhd_web 控件规范对齐
- 顶栏搜索移进右侧玻璃胶囊;输入框改淡玻璃(边线 0.46 → 0.16,悬停加深,聚焦 / 出错保留光晕) - 新增 SegmentedControl(滑动 seg-thumb),替换站点、下载、订阅、文件、智能体列表及对话框里的实心选中块;Tabs 改为同一枚滑块 - 开关型按钮统一 outline + aria-pressed 选中外观;页头 / 工具栏次操作描边、图标钮描边圆;文件排序改 Select;下载总速度加标签 - 分页一页放得下时只留总数、空列表不渲染、按容器宽度收起按钮 - 运行状态存储区重排;智能体列表页与会话页共用外壳路由,标题与左栏不再重挂载 - 站点卡片「⋯」不再单独换行;设置导航、状态计数、多选条件改玻璃选中态 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
8ff1817845
commit
c9b4ceb301
32 files changed
+753
-639
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { Bot, ChevronLeft, ChevronRight } from "lucide-react";
|
||||
import { Bot, ChevronLeft, ChevronRight, Search } from "lucide-react";
|
||||
import { type ReactNode, useEffect, useLayoutEffect, useRef, useState } from "react";
|
||||
import { Link } from "react-router";
|
||||
import { type AgentRunGroup, type AgentRunView, TRIGGER_LABEL, useAgentRuns } from "~/api/agent.ts";
|
||||
@@ -8,6 +8,7 @@ import { useListPagination } from "~/components/console/use-list-pagination.ts";
|
||||
import { Button } from "~/components/ui/button.tsx";
|
||||
import { Input } from "~/components/ui/input.tsx";
|
||||
import type { PaginationProps } from "~/components/ui/pagination.tsx";
|
||||
import { SegmentedControl } from "~/components/ui/segmented.tsx";
|
||||
import { Tabs, TabsList, TabsTrigger } from "~/components/ui/tabs.tsx";
|
||||
import { relTime } from "~/components/workbench/release-fields.ts";
|
||||
import { cn } from "~/lib/utils.ts";
|
||||
@@ -323,40 +324,38 @@ export function AgentSessionList({
|
||||
const rowProps = { activeId, hrefFor, onOpen };
|
||||
return (
|
||||
<nav aria-label="智能体会话列表" className={cn("flex min-h-0 flex-col", className)}>
|
||||
<div className="mb-2 space-y-1.5">
|
||||
<Tabs value={f.group} onValueChange={(v) => set({ group: v as AgentRunGroup })} className="pb-1">
|
||||
<div className="mb-2 space-y-2.5 border-b border-border/60 px-0.5 pb-3">
|
||||
<Tabs value={f.group} onValueChange={(v) => set({ group: v as AgentRunGroup })}>
|
||||
<TabsList aria-label="会话分栏" className="grid w-full grid-cols-2">
|
||||
{GROUPS.map((g) => (
|
||||
<TabsTrigger key={g.value} value={g.value}>
|
||||
<TabsTrigger key={g.value} value={g.value} className="justify-center">
|
||||
{g.label}
|
||||
</TabsTrigger>
|
||||
))}
|
||||
</TabsList>
|
||||
</Tabs>
|
||||
<Input
|
||||
type="search"
|
||||
value={f.q}
|
||||
onChange={(e) => set({ q: e.target.value })}
|
||||
placeholder="搜索会话"
|
||||
aria-label="搜索会话"
|
||||
className="h-8 md:text-caption"
|
||||
<div className="relative">
|
||||
<Search
|
||||
aria-hidden
|
||||
className="pointer-events-none absolute top-1/2 left-3 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"
|
||||
/>
|
||||
<Input
|
||||
type="search"
|
||||
value={f.q}
|
||||
onChange={(e) => set({ q: e.target.value })}
|
||||
placeholder="搜索会话"
|
||||
aria-label="搜索会话"
|
||||
className="h-8 rounded-full pl-8 md:text-caption"
|
||||
/>
|
||||
</div>
|
||||
<SegmentedControl
|
||||
label="筛选会话"
|
||||
size="xs"
|
||||
fill
|
||||
value={f.view}
|
||||
onChange={(v) => set({ view: v })}
|
||||
options={VIEWS.map((v) => ({ value: v.value, label: v.label }))}
|
||||
/>
|
||||
<fieldset aria-label="筛选会话" className="m-0 flex min-w-0 gap-1 border-0 p-0">
|
||||
{VIEWS.map((v) => (
|
||||
<button
|
||||
key={v.value}
|
||||
type="button"
|
||||
aria-pressed={f.view === v.value}
|
||||
onClick={() => set({ view: v.value })}
|
||||
className={cn(
|
||||
"h-7 cursor-pointer rounded-full border border-transparent px-2.5 text-meta text-muted-foreground outline-none transition-colors duration-micro hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
|
||||
f.view === v.value && "pill-selected text-foreground",
|
||||
)}
|
||||
>
|
||||
{v.label}
|
||||
</button>
|
||||
))}
|
||||
</fieldset>
|
||||
</div>
|
||||
<div
|
||||
ref={scroller}
|
||||
|
||||
Reference in new issue
Block a user