Explorar o código

导入了AcademicCapIcon作为课堂图标
在底部导航栏中添加了课堂入口链接
链接指向现有的/mobile/classroom路由
保持了与现有导航项一致的UI风格
使用startsWith匹配课堂路由路径,确保子路由也能高亮显示

yourname hai 7 meses
pai
achega
13b61a538c
Modificáronse 1 ficheiros con 10 adicións e 1 borrados
  1. 10 1
      client/mobile/mobile_app.tsx

+ 10 - 1
client/mobile/mobile_app.tsx

@@ -18,7 +18,7 @@ import HomePage from './pages_index.tsx';
 import LoginPage from './pages_login.tsx';
 import LoginPage from './pages_login.tsx';
 import RegisterPage from './pages_register.tsx';
 import RegisterPage from './pages_register.tsx';
 import { GlobalConfig } from "../share/types.ts";
 import { GlobalConfig } from "../share/types.ts";
-import { ExclamationTriangleIcon, HomeIcon, BellIcon, UserIcon } from '@heroicons/react/24/outline';
+import { ExclamationTriangleIcon, HomeIcon, BellIcon, UserIcon, AcademicCapIcon } from '@heroicons/react/24/outline';
 import { NotificationsPage } from './pages_messages.tsx';
 import { NotificationsPage } from './pages_messages.tsx';
 import { LivePage } from './pages_live.tsx';
 import { LivePage } from './pages_live.tsx';
 import { RTCPage } from './pages_rtc.tsx';
 import { RTCPage } from './pages_rtc.tsx';
@@ -230,6 +230,15 @@ const MobileLayout = () => {
             <BellIcon className="w-6 h-6 mb-1" />
             <BellIcon className="w-6 h-6 mb-1" />
             <span className="text-xs">通知</span>
             <span className="text-xs">通知</span>
           </Link>
           </Link>
+          <Link
+            to="/mobile/classroom"
+            className={`flex flex-col items-center py-2 px-4 ${
+              location.pathname.startsWith('/mobile/classroom') ? 'text-blue-600' : 'text-gray-500'
+            }`}
+          >
+            <AcademicCapIcon className="w-6 h-6 mb-1" />
+            <span className="text-xs">课堂</span>
+          </Link>
           <Link
           <Link
             to="/mobile/profile"
             to="/mobile/profile"
             className={`flex flex-col items-center py-2 px-4 ${
             className={`flex flex-col items-center py-2 px-4 ${