Просмотр исходного кода

feat(mobile): 添加任务页面导航

yourname 10 месяцев назад
Родитель
Сommit
6d05d461c2
2 измененных файлов с 17 добавлено и 1 удалено
  1. 15 1
      client/mobile/mobile_app.tsx
  2. 2 0
      server/migrations.ts

+ 15 - 1
client/mobile/mobile_app.tsx

@@ -18,7 +18,7 @@ import HomePage from './pages_index.tsx';
 import LoginPage from './pages_login.tsx';
 import RegisterPage from './pages_register.tsx';
 import { GlobalConfig } from "../share/types.ts";
-import { ExclamationTriangleIcon, HomeIcon, BellIcon, UserIcon } from '@heroicons/react/24/outline';
+import { ExclamationTriangleIcon, HomeIcon, BellIcon, UserIcon, ClipboardDocumentIcon } from '@heroicons/react/24/outline';
 import { NotificationsPage } from './pages_messages.tsx';
 // 设置中文语言
 dayjs.locale('zh-cn');
@@ -194,6 +194,7 @@ const ErrorPage = () => {
 
 import ProfilePage from './pages_profile.tsx'
 import SettingsPage from './pages_settings.tsx'
+import TasksPage from './pages_tasks.tsx'
 
 // 移动端布局组件 - 包含底部导航
 const MobileLayout = () => {
@@ -235,6 +236,15 @@ const MobileLayout = () => {
             <UserIcon className="w-6 h-6 mb-1" />
             <span className="text-xs">我的</span>
           </Link>
+          <Link
+            to="/mobile/tasks"
+            className={`flex flex-col items-center py-2 px-4 ${
+              location.pathname === '/mobile/tasks' ? 'text-blue-600' : 'text-gray-500'
+            }`}
+          >
+            <ClipboardDocumentIcon className="w-6 h-6 mb-1" />
+            <span className="text-xs">任务</span>
+          </Link>
         </div>
       </nav>
     </div>
@@ -284,6 +294,10 @@ const App = () => {
         {
           path: 'settings',
           element: <SettingsPage />
+        },
+        {
+          path: 'tasks',
+          element: <TasksPage />
         }
       ]
     },

+ 2 - 0
server/migrations.ts

@@ -521,6 +521,8 @@ const createUserMessagesTable: MigrationLiveDefinition = {
   }
 };
 
+
+
 // 导出所有迁移
 export const migrations = [
   createUsersTable,