|
| 1 | +// import MaterialIcons from '@expo/vector-icons/MaterialIcons'; |
| 2 | +import { Text } from 'react-native'; |
| 3 | + |
| 4 | +import useVisualScheme from '@/store/visualScheme'; |
| 5 | + |
| 6 | +import { |
| 7 | + ScheduleHeaderRight, |
| 8 | + ScheduleHeaderTitle, |
| 9 | +} from '@/modules/courseTable/components/ScheduleHeaders'; |
| 10 | +//import NotificationHeaderRight from '@/modules/notification/component/NotiNavbar'; |
| 11 | +import NotificationHeaderRight from '@/modules/notification/component/NotiNavbar'; |
| 12 | +import { commonColors, commonStyles } from '@/styles/common'; |
| 13 | + |
| 14 | +import type { SinglePageType } from '@/types/tabBarTypes'; |
| 15 | + |
| 16 | +/** |
| 17 | + * @enum tabBar颜色 |
| 18 | + * @description PRIMARY 为默认 |
| 19 | + */ |
| 20 | +export const TABBAR_COLOR = { |
| 21 | + PRIMARY: commonColors.darkGray, |
| 22 | +}; |
| 23 | + |
| 24 | +/** 导航栏配置 */ |
| 25 | +export const TABS: SinglePageType[] = [ |
| 26 | + { |
| 27 | + name: 'index', |
| 28 | + title: '首页', |
| 29 | + iconName: 'home', |
| 30 | + headerTitle: () => <></>, |
| 31 | + headerLeft: () => ( |
| 32 | + <Text |
| 33 | + style={[ |
| 34 | + commonStyles.TabBarPadding, |
| 35 | + commonStyles.fontLarge, |
| 36 | + useVisualScheme.getState().currentStyle?.header_text_style, |
| 37 | + ]} |
| 38 | + > |
| 39 | + 华师匣子 |
| 40 | + </Text> |
| 41 | + ), |
| 42 | + // headerRight: () => ( |
| 43 | + // <MaterialIcons |
| 44 | + // name="menu" |
| 45 | + // size={24} |
| 46 | + // style={[ |
| 47 | + // commonStyles.TabBarPadding, |
| 48 | + // useVisualScheme.getState().currentStyle?.header_text_style, |
| 49 | + // ]} |
| 50 | + // /> |
| 51 | + // ), |
| 52 | + }, |
| 53 | + { |
| 54 | + name: 'schedule', |
| 55 | + title: '日程', |
| 56 | + iconName: 'calendar', |
| 57 | + headerTitle: () => <ScheduleHeaderTitle />, |
| 58 | + headerRight: () => <ScheduleHeaderRight />, |
| 59 | + }, |
| 60 | + { |
| 61 | + name: 'notification', |
| 62 | + title: '通知', |
| 63 | + iconName: 'notification', |
| 64 | + headerTitle: () => <></>, |
| 65 | + headerLeft: () => ( |
| 66 | + <Text |
| 67 | + style={[ |
| 68 | + commonStyles.fontLarge, |
| 69 | + commonStyles.fontBold, |
| 70 | + commonStyles.TabBarPadding, |
| 71 | + { |
| 72 | + lineHeight: 30, |
| 73 | + height: 30, |
| 74 | + }, |
| 75 | + useVisualScheme.getState().currentStyle?.header_text_style, |
| 76 | + ]} |
| 77 | + > |
| 78 | + 消息通知 |
| 79 | + </Text> |
| 80 | + ), |
| 81 | + headerRight: () => <NotificationHeaderRight />, |
| 82 | + }, |
| 83 | + { |
| 84 | + name: 'setting', |
| 85 | + title: '其他', |
| 86 | + iconName: 'setting', |
| 87 | + headerTitle: () => ( |
| 88 | + <Text |
| 89 | + style={[ |
| 90 | + commonStyles.fontLarge, |
| 91 | + useVisualScheme.getState().currentStyle?.header_text_style, |
| 92 | + ]} |
| 93 | + > |
| 94 | + 其他 |
| 95 | + </Text> |
| 96 | + ), |
| 97 | + }, |
| 98 | +]; |
0 commit comments