feat(web): regroup console nav into 7 groups, split downloads/plans/tasks, add legacy redirects

- Sidebar: 概览/资源/订阅/下载/整理/Agent/系统, 18 items (+ 定时任务); single
  active item via findNavItem; 待处理 badge; collapsed rail groups; mobile drawer
  shares NAV_GROUPS.
- New pages: /downloads (queue + cache watermark header), /downloads/plans,
  /downloads/:id, /tasks (business tasks only) + /tasks/:id detail, /rules.
- Legacy links: ?tab= on tasks/subscriptions/sources redirect via clientLoader;
  /tasks/:downloadId falls back to /downloads/:id.
- List filters in URL query; settingsPath() helper for settings deep links.
- Copy per glossary (待处理, 收录策略, 引擎面板, 文件管理, 版本目标).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-28 02:46:47 +08:00
1 parent 5843527317
commit 909cd2ad49
31 files changed
+1247 -609

No files matched your search

+15 -5
View File
@@ -1,6 +1,7 @@
import type { PreferenceKind, PreferenceSuppression, PreferenceTag } from "@umt/contracts";
import { Ban, History, Plus, ShieldOff, Tags } from "lucide-react";
import { Ban, History, ListChecks, Plus, ShieldOff, Tags } from "lucide-react";
import { useMemo, useState } from "react";
import { Link } from "react-router";
import { toast } from "sonner";
import {
useDeleteTag,
@@ -16,6 +17,7 @@ import { EmptyState, ErrorState, LoadingState } from "~/components/console/empty
import { FilterBar, FilterSelect } from "~/components/console/filter-bar.tsx";
import { JsonView } from "~/components/console/json-view.tsx";
import { KvList } from "~/components/console/kv-list.tsx";
import { consolePath } from "~/components/console/nav.ts";
import { PageHeader } from "~/components/console/page-header.tsx";
import { StatusBadge } from "~/components/console/status-badge.tsx";
import { Timeline, type TimelineItem } from "~/components/console/timeline.tsx";
@@ -160,10 +162,18 @@ export default function PreferencesPage() {
title="偏好标签"
description="软偏好影响排序,硬规则直接排除。手动取消的偏好 Agent 不会再加回。"
actions={
<Button onClick={() => setForm({ open: true, tag: null })}>
<Plus />
添加偏好
</Button>
<>
<Button asChild variant="ghost" size="sm">
<Link to={consolePath("rules")}>
<ListChecks />
收录策略
</Link>
</Button>
<Button onClick={() => setForm({ open: true, tag: null })}>
<Plus />
添加偏好
</Button>
</>
}
/>