From f5c6c3a80f808a52a4955a204b589ccb9d773b95 Mon Sep 17 00:00:00 2001 From: ahyang <53590964+zAhYAng@users.noreply.github.com> Date: Sun, 2 Aug 2026 14:40:08 +0800 Subject: [PATCH] =?UTF-8?q?feat(platform):=20=E6=B8=A0=E9=81=93=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=20-=20=E5=A2=9E=E5=8A=A0=E6=B8=A0=E9=81=93=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=8A=98=E5=8F=A0=E6=93=8D=E4=BD=9C=20(#77)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/settings/index.tsx | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/web/src/pages/settings/index.tsx b/web/src/pages/settings/index.tsx index dba7ecc68..276c82a0f 100644 --- a/web/src/pages/settings/index.tsx +++ b/web/src/pages/settings/index.tsx @@ -1,5 +1,5 @@ import { App, Button, Form, Input, InputNumber, Popconfirm, Select, Tag, Tooltip } from "antd"; -import { ArrowLeft, Boxes, CircleCheck, Cloud, Info, Plus, RadioTower, RefreshCw, SlidersHorizontal, Trash2 } from "lucide-react"; +import { ArrowLeft, Boxes, ChevronDown, ChevronUp, CircleCheck, Cloud, Info, Plus, RadioTower, RefreshCw, SlidersHorizontal, Trash2 } from "lucide-react"; import { useEffect, useState, type ReactNode } from "react"; import { useNavigate, useSearchParams } from "react-router"; @@ -55,6 +55,7 @@ export default function SettingsPage() { const requestedSection = searchParams.get("section"); const [activeTab, setActiveTab] = useState(isConfigSection(requestedSection) ? requestedSection : "channels"); const [loadingChannelIds, setLoadingChannelIds] = useState([]); + const [collapsedChannelIds, setCollapsedChannelIds] = useState>(new Set()); const config = useConfigStore((state) => state.config); const updateConfig = useConfigStore((state) => state.updateConfig); const replaceConfig = useConfigStore((state) => state.replaceConfig); @@ -146,6 +147,15 @@ export default function SettingsPage() { setLoadingChannelIds((items) => (loading ? Array.from(new Set([...items, id])) : items.filter((item) => item !== id))); }; + const toggleChannelCollapsed = (id: string) => { + setCollapsedChannelIds((current) => { + const next = new Set(current); + if (next.has(id)) next.delete(id); + else next.add(id); + return next; + }); + }; + const refreshChannelModels = async (channel: ModelChannel) => { const connectionError = channelConnectionError(channel); if (connectionError) { @@ -327,6 +337,17 @@ export default function SettingsPage() { > 拉取模型 + +