feat(app): 添加应用启动资源预加载功能

- 实现了 AppBootResourceGate 组件用于管理应用启动时的资源加载
- 集成了图片和字体资源的预加载机制
- 添加了启动时的加载进度指示器和动画效果
- 创建了 DataLoadingIndicator 组件用于显示数据加载状态
- 在多个组件中替换原有的加载提示为新的 DataLoadingIndicator
- 更新了样式文件以支持新的加载动画和视觉效果
This commit is contained in:
JiaJun
2026-05-29 17:43:47 +08:00
parent f388aabfda
commit 54410aaac5
12 changed files with 516 additions and 69 deletions

View File

@@ -3,6 +3,7 @@ import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
import { RouterProvider } from '@tanstack/react-router'
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { AppBootResourceGate } from '@/components/app-boot-resource-gate'
import { AppNotificationAlert } from '@/components/ui/notification-alert'
import { APP_ROOT_ELEMENT_ID } from '@/constants'
import {
@@ -44,10 +45,14 @@ void initializeAuthSession().then(async () => {
createRoot(rootElement).render(
<StrictMode>
<QueryClientProvider client={queryClient}>
<GlobalAudioController />
<RouterProvider router={router} />
<AppNotificationAlert />
{shouldShowQueryDevtools && <ReactQueryDevtools initialIsOpen={false} />}
<AppBootResourceGate>
<GlobalAudioController />
<RouterProvider router={router} />
<AppNotificationAlert />
{shouldShowQueryDevtools && (
<ReactQueryDevtools initialIsOpen={false} />
)}
</AppBootResourceGate>
</QueryClientProvider>
</StrictMode>,
)