yangdx
commited on
Commit
·
24c7550
1
Parent(s):
3c36f59
Optimize ui for intialization stage
Browse files- lightrag/api/__init__.py +1 -1
- lightrag_webui/src/App.tsx +28 -6
lightrag/api/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1 |
-
__api_version__ = "
|
|
|
1 |
+
__api_version__ = "0133"
|
lightrag_webui/src/App.tsx
CHANGED
@@ -3,12 +3,13 @@ import ThemeProvider from '@/components/ThemeProvider'
|
|
3 |
import TabVisibilityProvider from '@/contexts/TabVisibilityProvider'
|
4 |
import ApiKeyAlert from '@/components/ApiKeyAlert'
|
5 |
import StatusIndicator from '@/components/status/StatusIndicator'
|
6 |
-
import { healthCheckInterval } from '@/lib/constants'
|
7 |
import { useBackendState, useAuthStore } from '@/stores/state'
|
8 |
import { useSettingsStore } from '@/stores/settings'
|
9 |
import { getAuthStatus } from '@/api/lightrag'
|
10 |
import SiteHeader from '@/features/SiteHeader'
|
11 |
import { InvalidApiKeyError, RequireApiKeError } from '@/api/lightrag'
|
|
|
12 |
|
13 |
import GraphViewer from '@/features/GraphViewer'
|
14 |
import DocumentManager from '@/features/DocumentManager'
|
@@ -122,11 +123,32 @@ function App() {
|
|
122 |
<ThemeProvider>
|
123 |
<TabVisibilityProvider>
|
124 |
{initializing ? (
|
125 |
-
// Loading state while initializing
|
126 |
-
<div className="flex h-screen w-screen
|
127 |
-
|
128 |
-
|
129 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
</div>
|
131 |
</div>
|
132 |
) : (
|
|
|
3 |
import TabVisibilityProvider from '@/contexts/TabVisibilityProvider'
|
4 |
import ApiKeyAlert from '@/components/ApiKeyAlert'
|
5 |
import StatusIndicator from '@/components/status/StatusIndicator'
|
6 |
+
import { healthCheckInterval, SiteInfo, webuiPrefix } from '@/lib/constants'
|
7 |
import { useBackendState, useAuthStore } from '@/stores/state'
|
8 |
import { useSettingsStore } from '@/stores/settings'
|
9 |
import { getAuthStatus } from '@/api/lightrag'
|
10 |
import SiteHeader from '@/features/SiteHeader'
|
11 |
import { InvalidApiKeyError, RequireApiKeError } from '@/api/lightrag'
|
12 |
+
import { ZapIcon } from 'lucide-react'
|
13 |
|
14 |
import GraphViewer from '@/features/GraphViewer'
|
15 |
import DocumentManager from '@/features/DocumentManager'
|
|
|
123 |
<ThemeProvider>
|
124 |
<TabVisibilityProvider>
|
125 |
{initializing ? (
|
126 |
+
// Loading state while initializing with simplified header
|
127 |
+
<div className="flex h-screen w-screen flex-col">
|
128 |
+
{/* Simplified header during initialization - matches SiteHeader structure */}
|
129 |
+
<header className="border-border/40 bg-background/95 supports-[backdrop-filter]:bg-background/60 sticky top-0 z-50 flex h-10 w-full border-b px-4 backdrop-blur">
|
130 |
+
<div className="min-w-[200px] w-auto flex items-center">
|
131 |
+
<a href={webuiPrefix} className="flex items-center gap-2">
|
132 |
+
<ZapIcon className="size-4 text-emerald-400" aria-hidden="true" />
|
133 |
+
<span className="font-bold md:inline-block">{SiteInfo.name}</span>
|
134 |
+
</a>
|
135 |
+
</div>
|
136 |
+
|
137 |
+
{/* Empty middle section to maintain layout */}
|
138 |
+
<div className="flex h-10 flex-1 items-center justify-center">
|
139 |
+
</div>
|
140 |
+
|
141 |
+
{/* Empty right section to maintain layout */}
|
142 |
+
<nav className="w-[200px] flex items-center justify-end">
|
143 |
+
</nav>
|
144 |
+
</header>
|
145 |
+
|
146 |
+
{/* Loading indicator in content area */}
|
147 |
+
<div className="flex flex-1 items-center justify-center">
|
148 |
+
<div className="text-center">
|
149 |
+
<div className="mb-2 h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"></div>
|
150 |
+
<p>Initializing...</p>
|
151 |
+
</div>
|
152 |
</div>
|
153 |
</div>
|
154 |
) : (
|