perf(frontend): split admin bundles and tighten data fetching

Add next/dynamic lazy loading for database, logs, and settings heavy
modules; migrate access-logs and task-executions to React Query; parallelize
login auth-sources with public config; consolidate users table tooltips;
enable lazy image decoding; and replace barrel @/lib/services imports with
direct module paths.
This commit is contained in:
ryan
2026-06-17 12:12:47 +08:00
parent 9550fa6ff3
commit a44043262e
43 changed files with 752 additions and 695 deletions
+3 -3
View File
@@ -2,7 +2,7 @@
import {createContext, ReactNode, useCallback, useContext, useEffect, useRef, useState} from 'react'
import services from '@/lib/services'
import {AuthService} from '@/lib/services/auth'
import {User} from '@/lib/services/auth/types'
@@ -54,7 +54,7 @@ export function UserProvider({ children }: { children: ReactNode }) {
const fetchUser = useCallback(async () => {
try {
setState(prev => ({ ...prev, loading: true, error: null }))
const user = await services.auth.getUserInfo()
const user = await AuthService.getUserInfo()
if (!isMountedRef.current) return
@@ -83,7 +83,7 @@ export function UserProvider({ children }: { children: ReactNode }) {
/** 用户登出 */
const logout = useCallback(async () => {
try {
await services.auth.logout()
await AuthService.logout()
if (!isMountedRef.current) return