Skip to content

Commit aa5e003

Browse files
committed
style(modules): unify file name style
1 parent 11e6c91 commit aa5e003

4 files changed

Lines changed: 104 additions & 5 deletions

File tree

src/app/(tabs)/_layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Toast from '@/components/toast';
99
import usePushSubscriptionStore from '@/store/pushSubscription';
1010
import useVisualScheme from '@/store/visualScheme';
1111

12-
import { TABS } from '@/constants/tabBar';
12+
import { TABS } from '@/constants/TABBAR';
1313
import PushSubscriptionPromptContent from '@/modules/setting/components/PushSubscriptionPromptContent';
1414
import {
1515
enablePushSubscription,

src/components/navi/TabBarItem.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { useEvents } from '@/store/events';
2-
import useVisualScheme from '@/store/visualScheme';
31
import { type FC, memo, useMemo } from 'react';
42
import {
53
Pressable,
@@ -10,7 +8,10 @@ import {
108
type ViewProps,
119
} from 'react-native';
1210

13-
import { TABBAR_COLOR } from '@/constants/tabBar';
11+
import { useEvents } from '@/store/events';
12+
import useVisualScheme from '@/store/visualScheme';
13+
14+
import { TABBAR_COLOR } from '@/constants/TABBAR';
1415

1516
import AnimatedScale from '../animatedView/AnimatedScale';
1617
import { TabBarIcon } from './TabBarIcon';

src/components/navi/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import ColorTransitionView from '@/components/view';
99

1010
import useVisualScheme from '@/store/visualScheme';
1111

12-
import { TABS } from '@/constants/tabBar';
12+
import { TABS } from '@/constants/TABBAR';
1313

1414
import TabBarItem from './TabBarItem';
1515

src/constants/TABBAR.tsx

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
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

Comments
 (0)