Skip to content

Commit df03a4e

Browse files
Mile-Awayclaude
andcommitted
chore: remove pr-demo, fix TS errors, support amd64 docker build
- Delete pr-demo/ directory and routes (unused) - Fix unused imports in ProductMatrix.tsx - Add supportedArchitectures to .yarnrc.yml for cross-platform builds - Add YARN_ENABLE_SCRIPTS=0 in Dockerfile for QEMU compatibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d6d4758 commit df03a4e

4 files changed

Lines changed: 60 additions & 58 deletions

File tree

‎web/.yarnrc.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
nodeLinker: node-modules
2+
3+
supportedArchitectures:
4+
os:
5+
- current
6+
- linux
7+
cpu:
8+
- current
9+
- x64

‎web/Dockerfile‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
FROM node:24-slim AS base
1+
FROM node:24-alpine AS base
2+
3+
# Dev stage: minimal image for hot-reload with volume mounts
4+
FROM base AS dev
5+
WORKDIR /app
6+
RUN corepack enable
27

38
FROM base AS deps
49
WORKDIR /app
@@ -11,8 +16,8 @@ COPY tsconfig.json tsconfig.app.json tsconfig.node.json ./
1116
# Install dependencies
1217
RUN corepack enable
1318

14-
# Use --immutable instead of --frozen-lockfile and add retry logic
15-
RUN yarn install --immutable
19+
# Skip native addon compilation (fails under QEMU cross-platform emulation)
20+
RUN YARN_ENABLE_SCRIPTS=0 yarn install --immutable
1621

1722
# Stage 1: Build the application
1823
FROM base AS builder

‎web/src/app/landscape/ProductMatrix.tsx‎

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,39 @@
11
import { motion } from 'framer-motion';
22
import { useTranslation } from 'react-i18next';
33
import {
4-
SiProton,
5-
SiStmicroelectronics,
6-
SiUnity,
7-
SiUnrealengine,
84
SiX,
95
} from 'react-icons/si';
6+
import {
7+
CpuChipIcon,
8+
CommandLineIcon,
9+
} from '@heroicons/react/24/solid';
1010

1111
export default function ProductMatrix() {
1212
const { t } = useTranslation();
1313

1414
const products = [
1515
{
16-
id: 'studio',
17-
icon: SiStmicroelectronics,
18-
color: 'text-sky-500',
19-
href: 'https://github.com/ScienceOL/Studio',
16+
id: 'osdl',
17+
icon: CpuChipIcon,
18+
color: 'text-emerald-500',
19+
href: '#osdl',
2020
},
2121
{
22-
id: 'protium',
23-
icon: SiProton,
24-
color: 'text-indigo-500',
25-
href: 'https://github.com/ScienceOL/Protium',
22+
id: 'opensdl',
23+
icon: CommandLineIcon,
24+
color: 'text-sky-500',
25+
href: 'https://github.com/ScienceOL/OpenSDL',
2626
},
2727
{
2828
id: 'xyzen',
2929
icon: SiX,
3030
color: 'text-amber-500',
31-
href: 'https://github.com/ScienceOL',
32-
},
33-
{
34-
id: 'anti',
35-
icon: SiUnity,
36-
color: 'text-rose-500',
37-
href: 'https://github.com/ScienceOL',
38-
},
39-
{
40-
id: 'labos',
41-
icon: SiUnrealengine,
42-
color: 'text-emerald-500',
43-
href: 'https://github.com/Uni-Lab-OS',
31+
href: 'https://xyzen.cc',
4432
},
4533
];
4634

4735
return (
48-
<div className="mt-12 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5">
36+
<div className="mt-12 grid grid-cols-1 gap-4 sm:grid-cols-3">
4937
{products.map((product, i) => (
5038
<motion.div
5139
key={product.id}

‎web/src/router.tsx‎

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import { Suspense, lazy } from "react";
2-
import { BrowserRouter, Route, Routes } from "react-router-dom";
3-
import App from "./app/App";
4-
import ProtectedDashboardLayout from "./components/layout/ProtectedDashboardPage";
1+
import { Suspense, lazy } from 'react';
2+
import { BrowserRouter, Route, Routes } from 'react-router-dom';
3+
import App from './app/App';
4+
import ProtectedDashboardLayout from './components/layout/ProtectedDashboardPage';
55

66
// 路由懒加载
7-
const ChatPage = lazy(() => import("./app/chat/page"));
7+
const ChatPage = lazy(() => import('./app/chat/page'));
88
const EnvironmentPage = lazy(() =>
9-
import("./app/dashboard/environment").then((module) => ({
9+
import('./app/dashboard/environment').then((module) => ({
1010
default: module.EnvironmentPage,
1111
}))
1212
);
1313
const EnvironmentDetail = lazy(
14-
() => import("./app/dashboard/environment/EnvironmentDetail")
14+
() => import('./app/dashboard/environment/EnvironmentDetail')
1515
);
16-
const DesktopWindow = lazy(() => import("./app/dashboard/Desktop"));
17-
const CallbackPage = lazy(() => import("./app/login/CallbackPage"));
18-
const LoginPage = lazy(() => import("./app/login/LoginPage"));
19-
const UiTestPage = lazy(() => import("./app/ui/page"));
16+
const DesktopWindow = lazy(() => import('./app/dashboard/Desktop'));
17+
const CallbackPage = lazy(() => import('./app/login/CallbackPage'));
18+
const LoginPage = lazy(() => import('./app/login/LoginPage'));
19+
const UiTestPage = lazy(() => import('./app/ui/page'));
2020

2121
const LoadingFallback = () => (
2222
<div className="flex h-screen w-full items-center justify-center bg-gray-50">
@@ -30,24 +30,25 @@ export default function Router() {
3030
<Suspense fallback={<LoadingFallback />}>
3131
<Routes>
3232
{/* 根路径 - App 组件根据登录状态分流 */}
33-
<Route path="/" element={<App />} />
34-
35-
{/* 公开路由 */}
36-
<Route path="/login" element={<LoginPage />} />
37-
<Route path="/login/callback" element={<CallbackPage />} />
38-
<Route path="/ui-test" element={<UiTestPage />} />
39-
<Route path="/chat" element={<ChatPage />} />
40-
41-
{/* 所有需要侧边栏和登录保护的页面 */}
42-
<Route element={<ProtectedDashboardLayout />}>
43-
{/*<Route path="/dashboard" element={<DashboardHome />} />*/}
44-
<Route path="dashboard" element={<DesktopWindow />} />
45-
<Route path="/dashboard/environment" element={<EnvironmentPage />} />
46-
<Route
47-
path="/dashboard/environment/:labUuid"
48-
element={<EnvironmentDetail />}
49-
/>
50-
</Route>
33+
<Route path="/" element={<App />} />
34+
{/* 公开路由 */}
35+
<Route path="/login" element={<LoginPage />} />
36+
<Route path="/login/callback" element={<CallbackPage />} />
37+
<Route path="/ui-test" element={<UiTestPage />} />
38+
<Route path="/chat" element={<ChatPage />} />{' '}
39+
{/* 所有需要侧边栏和登录保护的页面 */}
40+
<Route element={<ProtectedDashboardLayout />}>
41+
{/*<Route path="/dashboard" element={<DashboardHome />} />*/}
42+
<Route path="dashboard" element={<DesktopWindow />} />
43+
<Route
44+
path="/dashboard/environment"
45+
element={<EnvironmentPage />}
46+
/>
47+
<Route
48+
path="/dashboard/environment/:labUuid"
49+
element={<EnvironmentDetail />}
50+
/>
51+
</Route>
5152
</Routes>
5253
</Suspense>
5354
</BrowserRouter>

0 commit comments

Comments
 (0)