From f17329b0ff4750718eebae8ffdd8c0e98b6676a5 Mon Sep 17 00:00:00 2001 From: Supra4E8C Date: Mon, 15 Dec 2025 01:37:21 +0800 Subject: [PATCH] feat(layout): add logout button to header Add a logout icon and button to the main layout header, allowing users to log out directly from the navigation bar. --- src/components/layout/MainLayout.tsx | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/components/layout/MainLayout.tsx b/src/components/layout/MainLayout.tsx index a45a19d..83d18f4 100644 --- a/src/components/layout/MainLayout.tsx +++ b/src/components/layout/MainLayout.tsx @@ -93,12 +93,19 @@ const headerIcons = { ), - moon: ( - - - - ) -}; + moon: ( + + + + ), + logout: ( + + + + + + ) + }; const parseVersionSegments = (version?: string | null) => { if (!version) return null; @@ -134,6 +141,7 @@ export function MainLayout() { const serverVersion = useAuthStore((state) => state.serverVersion); const serverBuildDate = useAuthStore((state) => state.serverBuildDate); const connectionStatus = useAuthStore((state) => state.connectionStatus); + const logout = useAuthStore((state) => state.logout); const config = useConfigStore((state) => state.config); const fetchConfig = useConfigStore((state) => state.fetchConfig); @@ -324,6 +332,9 @@ export function MainLayout() { +