yourname 5 月之前
父節點
當前提交
af567310df
共有 5 個文件被更改,包括 8 次插入647 次删除
  1. 1 0
      package.json
  2. 0 632
      pnpm-lock.yaml
  3. 0 3
      src/client/admin/components/ErrorPage.tsx
  4. 1 5
      src/client/admin/components/NotFoundPage.tsx
  5. 6 7
      src/client/home/index.tsx

+ 1 - 0
package.json

@@ -8,6 +8,7 @@
     "start": "export NODE_ENV='production' && node dist-server/index.js"
     "start": "export NODE_ENV='production' && node dist-server/index.js"
   },
   },
   "dependencies": {
   "dependencies": {
+    "@ant-design/icons": "^6.0.0",
     "@emotion/react": "^11.14.0",
     "@emotion/react": "^11.14.0",
     "@heroicons/react": "^2.2.0",
     "@heroicons/react": "^2.2.0",
     "@hono/node-server": "^1.14.3",
     "@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 React from 'react';
 import { useRouteError, useNavigate } from 'react-router';
 import { useRouteError, useNavigate } from 'react-router';
 import { Alert, Button } from 'antd';
 import { Alert, Button } from 'antd';
-import { useTheme } from '../hooks/ThemeProvider';
 
 
 export const ErrorPage = () => {
 export const ErrorPage = () => {
   const navigate = useNavigate();
   const navigate = useNavigate();
-  const { isDark } = useTheme();
   const error = useRouteError() as any;
   const error = useRouteError() as any;
   const errorMessage = error?.statusText || error?.message || '未知错误';
   const errorMessage = error?.statusText || error?.message || '未知错误';
   
   
   return (
   return (
     <div className="flex flex-col items-center justify-center flex-grow p-4"
     <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">
       <div className="max-w-3xl w-full">
         <h1 className="text-2xl font-bold mb-4">发生错误</h1>
         <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 React from 'react';
 import { useNavigate } from 'react-router';
 import { useNavigate } from 'react-router';
 import { Button } from 'antd';
 import { Button } from 'antd';
-import { useTheme } from '../hooks/ThemeProvider';
 
 
 export const NotFoundPage = () => {
 export const NotFoundPage = () => {
   const navigate = useNavigate();
   const navigate = useNavigate();
-  const { isDark } = useTheme();
   
   
   return (
   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">
       <div className="max-w-3xl w-full">
         <h1 className="text-2xl font-bold mb-4">404 - 页面未找到</h1>
         <h1 className="text-2xl font-bold mb-4">404 - 页面未找到</h1>
         <p className="mb-6 text-gray-600 dark:text-gray-300">
         <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 { createRoot } from 'react-dom/client'
 import { getGlobalConfig } from '../utils/utils'
 import { getGlobalConfig } from '../utils/utils'
 
 
@@ -22,20 +21,20 @@ const Home = () => {
 
 
       {/* 管理入口按钮 */}
       {/* 管理入口按钮 */}
       <div className="space-y-4">
       <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"
           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"
           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>
     </div>
     </div>

部分文件因文件數量過多而無法顯示