refactor(frontend): 重构状态管理使用Zustand替代Context API
feat(auth): 添加账户锁定功能及自动解锁机制 feat(user): 在用户模型中添加lockedUntil字段 feat(api): 实现账户锁定逻辑和剩余尝试次数提示 perf(3d): 优化3D场景状态管理性能 perf(floorplan): 优化平面图状态管理性能 chore(deps): 添加zustand依赖 chore(config): 更新安全配置锁定时间为3分钟 docs: 更新部分组件注释 style: 调整登录页面样式
This commit is contained in:
@@ -35,7 +35,7 @@ import DeviceDetailDrawer from '../components/DeviceDetailDrawer';
|
||||
import CloseButton from '../components/CloseButton';
|
||||
import RackSelectorHeader from '../components/3d/RackSelectorHeader';
|
||||
import { Layout } from 'antd';
|
||||
import { useScene3D } from '../context/Scene3DContext';
|
||||
import { useScene3D } from '../hooks/useScene3D';
|
||||
import { useSortedRacks } from '../hooks/useSortedRacks';
|
||||
|
||||
const { Content } = Layout;
|
||||
@@ -46,7 +46,7 @@ const Rack3DVisualization = () => {
|
||||
// Scene 组件的 ref,用于调用重置视角方法
|
||||
const sceneRef = useRef(null);
|
||||
|
||||
// 使用 Scene3DContext 管理3D场景状态
|
||||
// 使用 Zustand Store 管理3D场景状态
|
||||
const {
|
||||
devices,
|
||||
setDevices,
|
||||
|
||||
Reference in New Issue
Block a user