yourname 5 місяців тому
батько
коміт
af567310df

+ 1 - 0
package.json

@@ -8,6 +8,7 @@
     "start": "export NODE_ENV='production' && node dist-server/index.js"
   },
   "dependencies": {
+    "@ant-design/icons": "^6.0.0",
     "@emotion/react": "^11.14.0",
     "@heroicons/react": "^2.2.0",
     "@hono/node-server": "^1.14.3",

Різницю між файлами не показано, бо вона завелика
+ 0 - 632
pnpm-lock.yaml


+ 0 - 3
src/client/admin/components/ErrorPage.tsx

@@ -1,17 +1,14 @@
 import React from 'react';
 import { useRouteError, useNavigate } from 'react-router';
 import { Alert, Button } from 'antd';
-import { useTheme } from '../hooks/ThemeProvider';
 
 export const ErrorPage = () => {
   const navigate = useNavigate();
-  const { isDark } = useTheme();
   const error = useRouteError() as any;
   const errorMessage = error?.statusText || error?.message || '未知错误';
   
   return (
     <div className="flex flex-col items-center justify-center flex-grow p-4"
-      style={{ color: isDark ? '#fff' : 'inherit' }}
     >
       <div className="max-w-3xl w-full">
         <h1 className="text-2xl font-bold mb-4">发生错误</h1>

+ 1 - 5
src/client/admin/components/NotFoundPage.tsx

@@ -1,16 +1,12 @@
 import React from 'react';
 import { useNavigate } from 'react-router';
 import { Button } from 'antd';
-import { useTheme } from '../hooks/ThemeProvider';
 
 export const NotFoundPage = () => {
   const navigate = useNavigate();
-  const { isDark } = useTheme();
   
   return (
-    <div className="flex flex-col items-center justify-center flex-grow p-4"
-      style={{ color: isDark ? '#fff' : 'inherit' }}
-    >
+    <div className="flex flex-col items-center justify-center flex-grow p-4">
       <div className="max-w-3xl w-full">
         <h1 className="text-2xl font-bold mb-4">404 - 页面未找到</h1>
         <p className="mb-6 text-gray-600 dark:text-gray-300">

+ 6 - 7
src/client/home/index.tsx

@@ -1,4 +1,3 @@
-import { Link } from 'react-router-dom'
 import { createRoot } from 'react-dom/client'
 import { getGlobalConfig } from '../utils/utils'
 
@@ -22,20 +21,20 @@ const Home = () => {
 
       {/* 管理入口按钮 */}
       <div className="space-y-4">
-        <Link
-          to="/admin"
+        <a
+          href="/admin"
           className="w-full flex justify-center py-3 px-4 border border-transparent rounded-md shadow-sm text-lg 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"
         >
           进入管理后台
-        </Link>
+        </a>
         
         {/* 移动端入口按钮 */}
-        <Link
-          to="/mobile"
+        <a
+          href="/mobile"
           className="w-full flex justify-center py-3 px-4 border border-blue-600 rounded-md shadow-sm text-lg font-medium text-blue-600 bg-white hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
         >
           进入移动端
-        </Link>
+        </a>
         
       </div>
     </div>

Деякі файли не було показано, через те що забагато файлів було змінено