diff --git a/frontend/src/ui/App.tsx b/frontend/src/ui/App.tsx
index 45b944e..17f2c5d 100644
--- a/frontend/src/ui/App.tsx
+++ b/frontend/src/ui/App.tsx
@@ -2,10 +2,11 @@
import { Loader2 } from "lucide-react";
import { useEffect, useState } from "react";
-import { openHome, readRoute, type AppRoute } from "@/application/route";
+import { readRoute, type AppRoute } from "@/application/route";
import { BrandMark } from "@/ui/components/BrandMark";
import { CanvasWorkspace } from "@/ui/pages/CanvasWorkspace";
import { HomePage } from "@/ui/pages/HomePage";
+import { NotFoundPage } from "@/ui/pages/NotFoundPage";
import { ProjectsRoutePage } from "@/ui/pages/ProjectsRoutePage";
import { useAuth } from "@/ui/auth/AuthProvider";
@@ -45,127 +46,6 @@ export function App() {
return ;
}
-function NotFoundPage() {
- const handleHome = () => {
- openHome();
- };
-
- return (
-
-
-
- 404:页面未找到!
- 我们到处都找过了,但找不到您要找的页面。
-
-
-
- );
-}
-
-function NotFoundMark() {
- return (
-
- );
-}
-
function ProjectAuthPreview() {
return (
diff --git a/frontend/src/ui/pages/NotFoundPage/index.css b/frontend/src/ui/pages/NotFoundPage/index.css
new file mode 100644
index 0000000..1c45099
--- /dev/null
+++ b/frontend/src/ui/pages/NotFoundPage/index.css
@@ -0,0 +1,83 @@
+.not-found-shell {
+ min-height: 100vh;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 48px 24px;
+ color: #101827;
+ background: #fff;
+}
+
+.not-found-content {
+ width: min(520px, 100%);
+ display: grid;
+ justify-items: center;
+ text-align: center;
+}
+
+.not-found-mark {
+ width: min(280px, 72vw);
+ height: auto;
+ margin-bottom: 57px;
+}
+
+.not-found-content h1 {
+ margin: 0;
+ color: #111827;
+ font-size: 32px;
+ line-height: 1.25;
+ font-weight: 800;
+ letter-spacing: 0;
+}
+
+.not-found-content p {
+ margin: 16px 0 32px;
+ color: #6b7280;
+ font-size: 14px;
+ line-height: 1.5;
+ font-weight: 500;
+}
+
+.not-found-content button {
+ min-width: 128px;
+ height: 42px;
+ padding: 0 26px;
+ border-radius: 12px;
+ color: #fff;
+ background: #030303;
+ font-size: 16px;
+ font-weight: 700;
+ line-height: 1;
+ transition: transform 0.16s ease, background 0.16s ease;
+}
+
+.not-found-content button:hover {
+ background: #171717;
+ transform: translateY(-1px);
+}
+
+@media (max-width: 760px) {
+ .not-found-shell {
+ padding: 44px 22px;
+ }
+
+ .not-found-mark {
+ margin-bottom: 44px;
+ }
+
+ .not-found-content h1 {
+ font-size: 28px;
+ }
+
+ .not-found-content p {
+ margin: 14px 0 28px;
+ font-size: 14px;
+ }
+
+ .not-found-content button {
+ min-width: 120px;
+ height: 40px;
+ border-radius: 12px;
+ font-size: 15px;
+ }
+}
diff --git a/frontend/src/ui/pages/NotFoundPage/index.tsx b/frontend/src/ui/pages/NotFoundPage/index.tsx
new file mode 100644
index 0000000..232c03c
--- /dev/null
+++ b/frontend/src/ui/pages/NotFoundPage/index.tsx
@@ -0,0 +1,123 @@
+"use client";
+
+import { openHome } from "@/application/route";
+import { useI18n } from "@/i18n/i18n";
+
+export function NotFoundPage() {
+ const { t } = useI18n();
+
+ return (
+
+
+
+ {t("notFoundTitle")}
+ {t("notFoundDescription")}
+
+
+
+ );
+}
+
+function NotFoundMark({ label }: { label: string }) {
+ return (
+
+ );
+}
diff --git a/frontend/src/ui/styles.css b/frontend/src/ui/styles.css
index bbce2b6..fff5d98 100644
--- a/frontend/src/ui/styles.css
+++ b/frontend/src/ui/styles.css
@@ -1,6 +1,7 @@
@import "./components/ProjectThumb/index.css";
@import "./components/ProjectCard/index.css";
@import "./pages/ProjectsPage/index.css";
+@import "./pages/NotFoundPage/index.css";
@import "./components/DeleteProjectDialog/index.css";
@import "./components/AccountManagementDialog/index.css";
@import "./components/WorkspaceTitle/index.css";
@@ -889,64 +890,6 @@ button:disabled {
font-weight: 800;
}
-.not-found-shell {
- min-height: 100vh;
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 48px 24px;
- color: #101827;
- background: #fff;
-}
-
-.not-found-content {
- width: min(520px, 100%);
- display: grid;
- justify-items: center;
- text-align: center;
-}
-
-.not-found-mark {
- width: min(280px, 72vw);
- height: auto;
- margin-bottom: 57px;
-}
-
-.not-found-content h1 {
- margin: 0;
- color: #111827;
- font-size: 32px;
- line-height: 1.25;
- font-weight: 800;
- letter-spacing: 0;
-}
-
-.not-found-content p {
- margin: 16px 0 32px;
- color: #6b7280;
- font-size: 14px;
- line-height: 1.5;
- font-weight: 500;
-}
-
-.not-found-content button {
- min-width: 128px;
- height: 42px;
- padding: 0 26px;
- border-radius: 12px;
- color: #fff;
- background: #030303;
- font-size: 16px;
- font-weight: 700;
- line-height: 1;
- transition: transform 0.16s ease, background 0.16s ease;
-}
-
-.not-found-content button:hover {
- background: #171717;
- transform: translateY(-1px);
-}
-
.project-auth-shell {
width: 100vw;
height: 100vh;
@@ -1215,29 +1158,6 @@ button:disabled {
display: none;
}
- .not-found-shell {
- padding: 44px 22px;
- }
-
- .not-found-mark {
- margin-bottom: 44px;
- }
-
- .not-found-content h1 {
- font-size: 28px;
- }
-
- .not-found-content p {
- margin: 14px 0 28px;
- font-size: 14px;
- }
-
- .not-found-content button {
- min-width: 120px;
- height: 40px;
- border-radius: 12px;
- font-size: 15px;
- }
}
.workspace-shell {