diff --git a/components/sidebar-history-item.tsx b/components/sidebar-history-item.tsx index dc9b805eb..d5f0f9ec8 100644 --- a/components/sidebar-history-item.tsx +++ b/components/sidebar-history-item.tsx @@ -1,4 +1,7 @@ +"use client"; + import Link from "next/link"; +import { useRouter } from "next/navigation"; import { memo } from "react"; import { useChatVisibility } from "@/hooks/use-chat-visibility"; import type { Chat } from "@/lib/db/schema"; @@ -37,6 +40,7 @@ const PureChatItem = ({ onDelete: (chatId: string) => void; setOpenMobile: (open: boolean) => void; }) => { + const router = useRouter(); const { visibilityType, setVisibilityType } = useChatVisibility({ chatId: chat.id, initialVisibilityType: chat.visibility, @@ -45,7 +49,13 @@ const PureChatItem = ({ return ( - setOpenMobile(false)}> + { + setOpenMobile(false); + router.refresh(); + }} + > {chat.title} diff --git a/components/top-navbar.tsx b/components/top-navbar.tsx index 2b00926ec..e9f714238 100644 --- a/components/top-navbar.tsx +++ b/components/top-navbar.tsx @@ -174,21 +174,15 @@ export function TopNavbar({ )} {/* AI智能精选 */} - + AI精选 + {/* 精选榜单 */} @@ -259,39 +253,30 @@ export function TopNavbar({ {/* 无限画布 */} - + 无限画布 + {/* 我的图册 */} - + 我的图册 + {/* 分隔线 (如果有链接或图册按钮,且是管理员) */} {isAdmin && ( @@ -300,20 +285,14 @@ export function TopNavbar({ {/* 系统设置(仅管理员可见)*/} {isAdmin && ( - + )}