diff --git a/.gitignore b/.gitignore
index 58fe590..fdc2dea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,5 @@ dist/
.turbo/
coverage/
.DS_Store
+next-env.d.ts
+*.tsbuildinfo
diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx
index 5c8fcb4..64d3b6f 100644
--- a/apps/web/app/layout.tsx
+++ b/apps/web/app/layout.tsx
@@ -1,5 +1,6 @@
import './globals.css';
import type { Metadata } from 'next';
+import { Sidebar } from '@/components/layout/Sidebar';
export const metadata: Metadata = {
title: 'FTB 项目管理',
@@ -13,7 +14,10 @@ export default function RootLayout({
}) {
return (
-
{children}
+
+
+ {children}
+
);
}
diff --git a/apps/web/components/layout/Sidebar.tsx b/apps/web/components/layout/Sidebar.tsx
new file mode 100644
index 0000000..568e278
--- /dev/null
+++ b/apps/web/components/layout/Sidebar.tsx
@@ -0,0 +1,64 @@
+'use client';
+
+import { usePathname, useRouter } from 'next/navigation';
+
+const NAV_ITEMS = [
+ { label: '与我相关', path: '/workspace', icon: '📋' },
+ { label: '产品', path: '/products', icon: '📦' },
+ { label: '项目', path: '/projects', icon: '📁' },
+ { label: '版本', path: '/versions', icon: '🏷️' },
+];
+
+const ADMIN_ITEMS = [
+ { label: '成员管理', path: '/admin/members', icon: '👥' },
+];
+
+export function Sidebar() {
+ const pathname = usePathname();
+ const router = useRouter();
+
+ const isActive = (path: string) => pathname.startsWith(path);
+
+ return (
+
+ );
+}
diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json
index e4effab..01b4ddb 100644
--- a/apps/web/tsconfig.json
+++ b/apps/web/tsconfig.json
@@ -1,7 +1,11 @@
{
"compilerOptions": {
"target": "ES2017",
- "lib": ["dom", "dom.iterable", "esnext"],
+ "lib": [
+ "dom",
+ "dom.iterable",
+ "esnext"
+ ],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
@@ -13,9 +17,24 @@
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
- "plugins": [{ "name": "next" }],
- "paths": { "@/*": ["./*"] }
+ "plugins": [
+ {
+ "name": "next"
+ }
+ ],
+ "paths": {
+ "@/*": [
+ "./*"
+ ]
+ }
},
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
- "exclude": ["node_modules"]
+ "include": [
+ "next-env.d.ts",
+ "**/*.ts",
+ "**/*.tsx",
+ ".next/types/**/*.ts"
+ ],
+ "exclude": [
+ "node_modules"
+ ]
}