-
- {item.name}
-
-
+ {item.href && item.href.startsWith('http') ? (
+
+ {item.name}
+
+
+ ) : (
+
+ {item.name}
+
+
+ )}
{item.description}
diff --git a/web/src/app/navbar/Projects.tsx b/web/src/app/navbar/Projects.tsx
index 6db9cb6..14cdb78 100644
--- a/web/src/app/navbar/Projects.tsx
+++ b/web/src/app/navbar/Projects.tsx
@@ -134,7 +134,7 @@ import {
// RectangleGroupIcon,
} from '@heroicons/react/24/outline';
-import { SiUnrealengine,SiUnity,SiProton,SiX,SiStmicroelectronics } from 'react-icons/si';
+import { SiUnrealengine,SiUnity,SiProton,SiX,SiStmicroelectronics,SiBlender } from 'react-icons/si';
import { GitHubIcon } from '@/assets/SocialIcons';
import NavbarFullWidth from './NavbarFullWidth';
import type { NavbarFullWidthProps } from './types';
@@ -165,7 +165,7 @@ const resources = [
{
name: 'Anti',
description: '用于实验室模拟的3D数字孪生平台',
- href: `/deepmd-kit`,
+ href: `/3D_lab`,
icon: SiUnity,
color:'text-rose-500',
},
@@ -175,7 +175,14 @@ const resources = [
href: `/deepmd-kit`,
icon: SiUnrealengine,
color:'text-emerald-500',
- }
+ },
+ {
+ name:'3D Lab',
+ description: '展示3D实验室的实验仪器和场景',
+ href: `/3D_lab`,
+ icon: SiBlender,
+ color:'text-purple-500',
+ },
];
const callsToAction = [
diff --git a/web/src/router.tsx b/web/src/router.tsx
index 8c9ac81..754fba8 100644
--- a/web/src/router.tsx
+++ b/web/src/router.tsx
@@ -1,38 +1,59 @@
+import { lazy, Suspense } from 'react';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import App from './app/App';
-import ChatPage from './app/chat/page';
-import { EnvironmentPage } from './app/dashboard/environment';
-import EnvironmentDetail from './app/dashboard/environment/EnvironmentDetail';
-import DashboardHome from './app/dashboard/Home';
-
-import CallbackPage from './app/login/CallbackPage';
-import LoginPage from './app/login/LoginPage';
-import UiTestPage from './app/ui/page';
import ProtectedDashboardLayout from './components/layout/ProtectedDashboardPage';
+// 路由懒加载
+const ChatPage = lazy(() => import('./app/chat/page'));
+const EnvironmentPage = lazy(() =>
+ import('./app/dashboard/environment').then((module) => ({
+ default: module.EnvironmentPage,
+ }))
+);
+const EnvironmentDetail = lazy(
+ () => import('./app/dashboard/environment/EnvironmentDetail')
+);
+const DashboardHome = lazy(() => import('./app/dashboard/Home'));
+const CallbackPage = lazy(() => import('./app/login/CallbackPage'));
+const LoginPage = lazy(() => import('./app/login/LoginPage'));
+const UiTestPage = lazy(() => import('./app/ui/page'));
+const Lab3DPage = lazy(() => import('./app/3D_lab/page'));
+
+const LoadingFallback = () => (
+
+);
+
export default function Router() {
return (
-
- {/* 根路径 - App 组件根据登录状态分流 */}
- } />
+ }>
+
+ {/* 根路径 - App 组件根据登录状态分流 */}
+ } />
- {/* 公开路由 */}
- } />
- } />
- } />
- } />
+ {/* 公开路由 */}
+ } />
+ } />
+ } />
+ } />
+ } />
- {/* 所有需要侧边栏和登录保护的页面 */}
- }>
- } />
- } />
- }
- />
-
-
+ {/* 所有需要侧边栏和登录保护的页面 */}
+ }>
+ } />
+ }
+ />
+ }
+ />
+
+
+
);
}
From d128202c93ebbea743405e0fc3ceae810b1c2720 Mon Sep 17 00:00:00 2001
From: SII-123qwe-asd-ux <1120240220@mail.nankai.edu.cn>
Date: Tue, 16 Dec 2025 13:41:26 +0800
Subject: [PATCH 2/8] chore: Add uv.lock file for Python dependency management
---
uv.lock | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 uv.lock
diff --git a/uv.lock b/uv.lock
new file mode 100644
index 0000000..7875bfa
--- /dev/null
+++ b/uv.lock
@@ -0,0 +1,7 @@
+version = 4
+requires-python = ">=3.8"
+
+[[package]]
+name = "placeholder"
+version = "0.0.0"
+description = "Placeholder package for UV lock file"
From 7951b12fcb50cb86f238603429a5c335a065ee70 Mon Sep 17 00:00:00 2001
From: SII-123qwe-asd-ux <1120240220@mail.nankai.edu.cn>
Date: Tue, 16 Dec 2025 13:48:15 +0800
Subject: [PATCH 3/8] chore: Add pyproject.toml for Python project
configuration
---
pyproject.toml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 pyproject.toml
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..d0336ef
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,22 @@
+[build-system]
+requires = ["setuptools>=45", "wheel", "setuptools-scm[toml]>=6.2"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "studio"
+version = "0.1.0"
+description = "Studio - Interactive laboratory visualization and management system"
+readme = "README.md"
+requires-python = ">=3.8"
+license = {text = "MIT"}
+authors = [
+ {name = "ScienceOL", email = "contact@sciol.ac.cn"}
+]
+
+dependencies = []
+
+[project.optional-dependencies]
+dev = []
+
+[tool.setuptools]
+packages = ["service"]
From add091d37d407d315267d1d0f142ffdacbf61858 Mon Sep 17 00:00:00 2001
From: SII-123qwe-asd-ux <1120240220@mail.nankai.edu.cn>
Date: Tue, 16 Dec 2025 13:55:38 +0800
Subject: [PATCH 4/8] fix: Update uv.lock to v1 schema format
---
uv.lock | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/uv.lock b/uv.lock
index 7875bfa..64e2178 100644
--- a/uv.lock
+++ b/uv.lock
@@ -1,7 +1,2 @@
-version = 4
+version = 1
requires-python = ">=3.8"
-
-[[package]]
-name = "placeholder"
-version = "0.0.0"
-description = "Placeholder package for UV lock file"
From 5be529641ab91bc23c82536377aeeb57a2833644 Mon Sep 17 00:00:00 2001
From: SII-123qwe-asd-ux <1120240220@mail.nankai.edu.cn>
Date: Tue, 16 Dec 2025 13:59:40 +0800
Subject: [PATCH 5/8] fix: Update uv.lock to v1 schema format
---
web/src/router.tsx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/web/src/router.tsx b/web/src/router.tsx
index 42e34fa..367c438 100644
--- a/web/src/router.tsx
+++ b/web/src/router.tsx
@@ -43,8 +43,7 @@ export default function Router() {
{/* 所有需要侧边栏和登录保护的页面 */}
}>
- {/*
} />*/}
-
} />
+
} />
} />
Date: Tue, 16 Dec 2025 14:13:15 +0800
Subject: [PATCH 6/8] chore: Add service Python project configuration
---
service/pyproject.toml | 18 ++++++++++++++++++
service/uv.lock | 2 ++
2 files changed, 20 insertions(+)
create mode 100644 service/pyproject.toml
create mode 100644 service/uv.lock
diff --git a/service/pyproject.toml b/service/pyproject.toml
new file mode 100644
index 0000000..fe9957f
--- /dev/null
+++ b/service/pyproject.toml
@@ -0,0 +1,18 @@
+[build-system]
+requires = ["setuptools>=45", "wheel", "setuptools-scm[toml]>=6.2"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "studio-service"
+version = "0.1.0"
+description = "Studio Service - Go-based backend service"
+readme = "README.md"
+requires-python = ">=3.8"
+
+dependencies = []
+
+[project.optional-dependencies]
+dev = ["pre-commit>=3.5.0"]
+
+[tool.setuptools]
+packages = []
diff --git a/service/uv.lock b/service/uv.lock
new file mode 100644
index 0000000..64e2178
--- /dev/null
+++ b/service/uv.lock
@@ -0,0 +1,2 @@
+version = 1
+requires-python = ">=3.8"
From 81a01aacf76028ca59cee3584462f9529e60ae3d Mon Sep 17 00:00:00 2001
From: SII-123qwe-asd-ux <1120240220@mail.nankai.edu.cn>
Date: Tue, 16 Dec 2025 14:18:51 +0800
Subject: [PATCH 7/8] chore: Update pre-commit config to exclude problematic
files
---
.pre-commit-config.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5d49de4..03a5486 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -6,6 +6,6 @@ repos:
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- exclude: '\.(yaml|yml|json|md)$'
+ exclude: '\.(yaml|yml|json|md|sh|go|conf)$|^(launch/|infra/|docker/)'
- id: check-yaml
- id: check-added-large-files
From 71f3dd44e89fc4b7cee9d8d720a30cdff3e016af Mon Sep 17 00:00:00 2001
From: SII-123qwe-asd-ux <1120240220@mail.nankai.edu.cn>
Date: Tue, 16 Dec 2025 14:26:08 +0800
Subject: [PATCH 8/8] chore: Exclude more problematic files from pre-commit
hooks
---
.pre-commit-config.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 03a5486..5b8ff5d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -5,6 +5,7 @@ repos:
rev: v6.0.0
hooks:
- id: trailing-whitespace
+ exclude: '\.(yaml|yml|json|md|sh|go|conf)$|^(launch/|infra/|docker/|\.github/)'
- id: end-of-file-fixer
exclude: '\.(yaml|yml|json|md|sh|go|conf)$|^(launch/|infra/|docker/)'
- id: check-yaml