From 00215decc5d0bfb15547398d2d7ebea1c0ba060a Mon Sep 17 00:00:00 2001 From: zihluwang Date: Thu, 2 Apr 2026 10:01:18 +0800 Subject: [PATCH] feat: add modification codes page and update routing; remove about and contact pages --- .vscode/launch.json | 22 ++++ .vscode/settings.json | 5 + index.html | 2 +- src/components/error-page/index.tsx | 10 +- src/data/modification-codes.json | 9 ++ src/index.css | 2 - src/layout/hero-layout/index.tsx | 34 +++--- src/page/about/index.tsx | 110 ----------------- src/page/contact/index.tsx | 171 --------------------------- src/page/home/index.tsx | 140 ---------------------- src/page/mod-codes/index.tsx | 177 ++++++++++++++++++++++++++++ src/router/index.tsx | 10 +- 12 files changed, 237 insertions(+), 455 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 src/data/modification-codes.json delete mode 100644 src/page/about/index.tsx delete mode 100644 src/page/contact/index.tsx delete mode 100644 src/page/home/index.tsx create mode 100644 src/page/mod-codes/index.tsx diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..d439075 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,22 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node-terminal", + "request": "launch", + "name": "pnpm dev", + "command": "pnpm dev", + "cwd": "${workspaceFolder}" + }, + { + "type": "node-terminal", + "request": "launch", + "name": "build", + "command": "pnpm build", + "cwd": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..f60bf45 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "chat.tools.terminal.autoApprove": { + "pnpm": true + } +} \ No newline at end of file diff --git a/index.html b/index.html index a74360e..4c8aa19 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - OnixByte React Template + 三角洲行动改枪码库
diff --git a/src/components/error-page/index.tsx b/src/components/error-page/index.tsx index 6e5bcb1..c640120 100644 --- a/src/components/error-page/index.tsx +++ b/src/components/error-page/index.tsx @@ -31,17 +31,17 @@ export default function ErrorPage() { {/* Error Title */}

- Oops! Something went wrong + 页面出现错误

{/* Error Message */}

- {error?.statusText ?? error?.message ?? "An unexpected error occurred"} + {error?.statusText ?? error?.message ?? "发生了未预期的错误"}

{error?.status && (

- Error Code: {error.status} + 错误代码:{error.status}

)}
@@ -52,13 +52,13 @@ export default function ErrorPage() { to="/" className="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" > - Go back home + 返回首页 diff --git a/src/data/modification-codes.json b/src/data/modification-codes.json new file mode 100644 index 0000000..ae02961 --- /dev/null +++ b/src/data/modification-codes.json @@ -0,0 +1,9 @@ +[ + { + "weapon": "SCAR-H战斗步枪", + "modification-code": "6JJE3180BB9B3KKCCH41C", + "mode": "烽火地带", + "tags": ["精锐制式券", "突击步枪", "稳定"], + "note": "精锐火力券提供的 SCAR-H" + } +] diff --git a/src/index.css b/src/index.css index 6ce8f11..5646bcd 100644 --- a/src/index.css +++ b/src/index.css @@ -4,10 +4,8 @@ html, body { margin: 0; padding: 0; width: 100%; - height: 100%; } #root { width: 100%; - height: 100%; } \ No newline at end of file diff --git a/src/layout/hero-layout/index.tsx b/src/layout/hero-layout/index.tsx index 04a446b..e64a927 100644 --- a/src/layout/hero-layout/index.tsx +++ b/src/layout/hero-layout/index.tsx @@ -10,52 +10,48 @@ export default function HeroLayout() { const today = useMemo(() => dayjs(), []) return ( -
+
{/* Navigation Header */}
-
+

- OnixByte React Template + 三角洲行动改枪码库

{/* Main Content Area */} -
+
{/* Footer */} -