feat(Apps): introduce Apps tab and related screens for enhanced navigation
- Added a new "Apps" tab in the TabsLayout, providing users with access to various applications. - Created AppsScreen to display app entries, including a schedule feature with a calendar icon. - Implemented routing for the schedule and course screens under the new Apps tab structure. - Updated navigation hrefs to reflect the new Apps section, improving overall user experience. - Refactored HomeScreen to manage bottom tab visibility based on scroll events, enhancing usability.
This commit is contained in:
@@ -61,15 +61,6 @@ export default function TabsLayout() {
|
||||
),
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="schedule"
|
||||
options={{
|
||||
title: '课表',
|
||||
tabBarIcon: ({ color, focused }) => (
|
||||
<MaterialCommunityIcons name="calendar-today" size={focused ? 24 : 22} color={color} />
|
||||
),
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="messages"
|
||||
options={{
|
||||
@@ -84,6 +75,19 @@ export default function TabsLayout() {
|
||||
),
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="apps"
|
||||
options={{
|
||||
title: '应用',
|
||||
tabBarIcon: ({ color, focused }) => (
|
||||
<MaterialCommunityIcons
|
||||
name={focused ? 'view-grid' : 'view-grid-outline'}
|
||||
size={focused ? 24 : 22}
|
||||
color={color}
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="profile"
|
||||
options={{
|
||||
|
||||
5
app/(app)/(tabs)/apps/_layout.tsx
Normal file
5
app/(app)/(tabs)/apps/_layout.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { Stack } from 'expo-router';
|
||||
|
||||
export default function AppsStackLayout() {
|
||||
return <Stack screenOptions={{ headerShown: false }} />;
|
||||
}
|
||||
5
app/(app)/(tabs)/apps/index.tsx
Normal file
5
app/(app)/(tabs)/apps/index.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { AppsScreen } from '../../../../src/screens/apps';
|
||||
|
||||
export default function AppsRoute() {
|
||||
return <AppsScreen />;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CourseDetailScreen } from '../../../../src/screens/schedule';
|
||||
import { CourseDetailScreen } from '../../../../../src/screens/schedule';
|
||||
|
||||
export default function CourseDetailRoute() {
|
||||
return <CourseDetailScreen />;
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ScheduleScreen } from '../../../../src/screens/schedule';
|
||||
import { ScheduleScreen } from '../../../../../src/screens/schedule';
|
||||
|
||||
export default function ScheduleRoute() {
|
||||
return <ScheduleScreen />;
|
||||
Reference in New Issue
Block a user