Update webui assets
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -8,7 +8,7 @@
|
|||||||
<link rel="icon" type="image/svg+xml" href="logo.png" />
|
<link rel="icon" type="image/svg+xml" href="logo.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Lightrag</title>
|
<title>Lightrag</title>
|
||||||
<script type="module" crossorigin src="/webui/assets/index-Ch1xmcI2.js"></script>
|
<script type="module" crossorigin src="/webui/assets/index-DMnuT9rH.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/webui/assets/index-BE_O4IWQ.css">
|
<link rel="stylesheet" crossorigin href="/webui/assets/index-BE_O4IWQ.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@@ -77,7 +77,7 @@ const ProtectedRoute = ({ children }: ProtectedRouteProps) => {
|
|||||||
// Get current path and check if it's a direct access
|
// Get current path and check if it's a direct access
|
||||||
const currentPath = window.location.hash.slice(1); // Remove the '#' from hash
|
const currentPath = window.location.hash.slice(1); // Remove the '#' from hash
|
||||||
const isLoginPage = currentPath === '/login';
|
const isLoginPage = currentPath === '/login';
|
||||||
|
|
||||||
// Skip redirect if already on login page
|
// Skip redirect if already on login page
|
||||||
if (isLoginPage) {
|
if (isLoginPage) {
|
||||||
return null;
|
return null;
|
||||||
|
@@ -95,15 +95,15 @@ const LoginPage = () => {
|
|||||||
} else {
|
} else {
|
||||||
toast.success(t('login.successMessage'))
|
toast.success(t('login.successMessage'))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Navigate to home page after successful login
|
// Navigate to home page after successful login
|
||||||
navigate('/')
|
navigate('/')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Login failed...', error)
|
console.error('Login failed...', error)
|
||||||
toast.error(t('login.errorInvalidCredentials'))
|
toast.error(t('login.errorInvalidCredentials'))
|
||||||
|
|
||||||
// Clear any existing auth state
|
// Clear any existing auth state
|
||||||
useAuthStore.getState().logout()
|
useAuthStore.getState().logout()
|
||||||
// Clear local storage
|
// Clear local storage
|
||||||
localStorage.removeItem('LIGHTRAG-API-TOKEN')
|
localStorage.removeItem('LIGHTRAG-API-TOKEN')
|
||||||
} finally {
|
} finally {
|
||||||
|
Reference in New Issue
Block a user