From 81450461156808685bbf84c28699a6fd271d7a71 Mon Sep 17 00:00:00 2001 From: yangdx Date: Tue, 18 Mar 2025 23:12:02 +0800 Subject: [PATCH] Remove login modal state from auth store --- lightrag_webui/src/stores/state.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lightrag_webui/src/stores/state.ts b/lightrag_webui/src/stores/state.ts index 2117b003..5a24e72a 100644 --- a/lightrag_webui/src/stores/state.ts +++ b/lightrag_webui/src/stores/state.ts @@ -18,11 +18,9 @@ interface BackendState { interface AuthState { isAuthenticated: boolean; - showLoginModal: boolean; isGuestMode: boolean; // Add guest mode flag login: (token: string, isGuest?: boolean) => void; logout: () => void; - setShowLoginModal: (show: boolean) => void; } const useBackendStateStoreBase = create()((set) => ({ @@ -104,14 +102,12 @@ export const useAuthStore = create(set => { return { isAuthenticated: initialState.isAuthenticated, - showLoginModal: false, isGuestMode: initialState.isGuestMode, login: (token, isGuest = false) => { localStorage.setItem('LIGHTRAG-API-TOKEN', token); set({ isAuthenticated: true, - showLoginModal: false, isGuestMode: isGuest }); }, @@ -122,8 +118,6 @@ export const useAuthStore = create(set => { isAuthenticated: false, isGuestMode: false }); - }, - - setShowLoginModal: (show) => set({ showLoginModal: show }) + } }; });