yangdx commited on
Commit
1e26fbc
·
1 Parent(s): 1473856

Remove login modal state from auth store

Browse files
Files changed (1) hide show
  1. lightrag_webui/src/stores/state.ts +1 -7
lightrag_webui/src/stores/state.ts CHANGED
@@ -18,11 +18,9 @@ interface BackendState {
18
 
19
  interface AuthState {
20
  isAuthenticated: boolean;
21
- showLoginModal: boolean;
22
  isGuestMode: boolean; // Add guest mode flag
23
  login: (token: string, isGuest?: boolean) => void;
24
  logout: () => void;
25
- setShowLoginModal: (show: boolean) => void;
26
  }
27
 
28
  const useBackendStateStoreBase = create<BackendState>()((set) => ({
@@ -104,14 +102,12 @@ export const useAuthStore = create<AuthState>(set => {
104
 
105
  return {
106
  isAuthenticated: initialState.isAuthenticated,
107
- showLoginModal: false,
108
  isGuestMode: initialState.isGuestMode,
109
 
110
  login: (token, isGuest = false) => {
111
  localStorage.setItem('LIGHTRAG-API-TOKEN', token);
112
  set({
113
  isAuthenticated: true,
114
- showLoginModal: false,
115
  isGuestMode: isGuest
116
  });
117
  },
@@ -122,8 +118,6 @@ export const useAuthStore = create<AuthState>(set => {
122
  isAuthenticated: false,
123
  isGuestMode: false
124
  });
125
- },
126
-
127
- setShowLoginModal: (show) => set({ showLoginModal: show })
128
  };
129
  });
 
18
 
19
  interface AuthState {
20
  isAuthenticated: boolean;
 
21
  isGuestMode: boolean; // Add guest mode flag
22
  login: (token: string, isGuest?: boolean) => void;
23
  logout: () => void;
 
24
  }
25
 
26
  const useBackendStateStoreBase = create<BackendState>()((set) => ({
 
102
 
103
  return {
104
  isAuthenticated: initialState.isAuthenticated,
 
105
  isGuestMode: initialState.isGuestMode,
106
 
107
  login: (token, isGuest = false) => {
108
  localStorage.setItem('LIGHTRAG-API-TOKEN', token);
109
  set({
110
  isAuthenticated: true,
 
111
  isGuestMode: isGuest
112
  });
113
  },
 
118
  isAuthenticated: false,
119
  isGuestMode: false
120
  });
121
+ }
 
 
122
  };
123
  });