Optimize ui for intialization stage
This commit is contained in:
@@ -1 +1 @@
|
|||||||
__api_version__ = "0132"
|
__api_version__ = "0133"
|
||||||
|
@@ -3,12 +3,13 @@ import ThemeProvider from '@/components/ThemeProvider'
|
|||||||
import TabVisibilityProvider from '@/contexts/TabVisibilityProvider'
|
import TabVisibilityProvider from '@/contexts/TabVisibilityProvider'
|
||||||
import ApiKeyAlert from '@/components/ApiKeyAlert'
|
import ApiKeyAlert from '@/components/ApiKeyAlert'
|
||||||
import StatusIndicator from '@/components/status/StatusIndicator'
|
import StatusIndicator from '@/components/status/StatusIndicator'
|
||||||
import { healthCheckInterval } from '@/lib/constants'
|
import { healthCheckInterval, SiteInfo, webuiPrefix } from '@/lib/constants'
|
||||||
import { useBackendState, useAuthStore } from '@/stores/state'
|
import { useBackendState, useAuthStore } from '@/stores/state'
|
||||||
import { useSettingsStore } from '@/stores/settings'
|
import { useSettingsStore } from '@/stores/settings'
|
||||||
import { getAuthStatus } from '@/api/lightrag'
|
import { getAuthStatus } from '@/api/lightrag'
|
||||||
import SiteHeader from '@/features/SiteHeader'
|
import SiteHeader from '@/features/SiteHeader'
|
||||||
import { InvalidApiKeyError, RequireApiKeError } from '@/api/lightrag'
|
import { InvalidApiKeyError, RequireApiKeError } from '@/api/lightrag'
|
||||||
|
import { ZapIcon } from 'lucide-react'
|
||||||
|
|
||||||
import GraphViewer from '@/features/GraphViewer'
|
import GraphViewer from '@/features/GraphViewer'
|
||||||
import DocumentManager from '@/features/DocumentManager'
|
import DocumentManager from '@/features/DocumentManager'
|
||||||
@@ -122,13 +123,34 @@ function App() {
|
|||||||
<ThemeProvider>
|
<ThemeProvider>
|
||||||
<TabVisibilityProvider>
|
<TabVisibilityProvider>
|
||||||
{initializing ? (
|
{initializing ? (
|
||||||
// Loading state while initializing
|
// Loading state while initializing with simplified header
|
||||||
<div className="flex h-screen w-screen items-center justify-center">
|
<div className="flex h-screen w-screen flex-col">
|
||||||
|
{/* Simplified header during initialization - matches SiteHeader structure */}
|
||||||
|
<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">
|
||||||
|
<div className="min-w-[200px] w-auto flex items-center">
|
||||||
|
<a href={webuiPrefix} className="flex items-center gap-2">
|
||||||
|
<ZapIcon className="size-4 text-emerald-400" aria-hidden="true" />
|
||||||
|
<span className="font-bold md:inline-block">{SiteInfo.name}</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Empty middle section to maintain layout */}
|
||||||
|
<div className="flex h-10 flex-1 items-center justify-center">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Empty right section to maintain layout */}
|
||||||
|
<nav className="w-[200px] flex items-center justify-end">
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{/* Loading indicator in content area */}
|
||||||
|
<div className="flex flex-1 items-center justify-center">
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<div className="mb-2 h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"></div>
|
<div className="mb-2 h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"></div>
|
||||||
<p>Initializing...</p>
|
<p>Initializing...</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
) : (
|
) : (
|
||||||
// Main content after initialization
|
// Main content after initialization
|
||||||
<main className="flex h-screen w-screen overflow-hidden">
|
<main className="flex h-screen w-screen overflow-hidden">
|
||||||
|
Reference in New Issue
Block a user