Update webui assets

This commit is contained in:
yangdx
2025-03-19 19:09:03 +08:00
parent 99814b57d9
commit 32dcbec7b5
4 changed files with 130 additions and 130 deletions

View File

@@ -77,7 +77,7 @@ const ProtectedRoute = ({ children }: ProtectedRouteProps) => {
// Get current path and check if it's a direct access
const currentPath = window.location.hash.slice(1); // Remove the '#' from hash
const isLoginPage = currentPath === '/login';
// Skip redirect if already on login page
if (isLoginPage) {
return null;

View File

@@ -95,15 +95,15 @@ const LoginPage = () => {
} else {
toast.success(t('login.successMessage'))
}
// Navigate to home page after successful login
navigate('/')
} catch (error) {
console.error('Login failed...', error)
toast.error(t('login.errorInvalidCredentials'))
// Clear any existing auth state
useAuthStore.getState().logout()
useAuthStore.getState().logout()
// Clear local storage
localStorage.removeItem('LIGHTRAG-API-TOKEN')
} finally {