-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.js
127 lines (117 loc) · 3.88 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/**
* @format
*/
'use strict';
import React, { Fragment } from 'react'
import {
Text,
View,
Platform,
StatusBar,
StyleSheet,
Animated,
Easing,
AppRegistry,
} from 'react-native';
import { createStackNavigator, createAppContainer } from 'react-navigation';
import MainTabs from './js/pages/MainTabs'
import Theme from './js/utils/Theme';
import KebiaoPage from './js/pages/KebiaoPage';
import WechatArticlePage from './js/pages/WechatArticlePage';
import {
MyToast,
ModalMenu,
ContextMenu,
SlideInMenu,
HeaderLeft,
} from './js/components';
import Common_LoginPage from './js/pages/Common/LoginPage';
import Common_RegisterPage from './js/pages/Common/RegisterPage';
import Common_SettingPage from './js/pages/Common/SettingPage';
import Common_SearchPage from './js/pages/Common/SearchPage';
import Common_WebviewPage from './js/pages/Common/WebviewPage';
import Common_MediumTransPage from './js/pages/Common/MediumTransPage';
import Status_StatusPage from './js/pages/Status/StatusPage';
import Status_TopicPage from './js/pages/Status/TopicPage';
import Status_NewStatusPage from './js/pages/Status/NewStatusPage';
import User_ChatPage from './js/pages/User/ChatPage';
import User_QRCodePage from './js/pages/User/QRCodePage';
import User_MessagePage from './js/pages/User/MessagePage';
import User_UserPage from './js/pages/User/UserPage';
import User_EditProfilePage from './js/pages/User/EditProfilePage';
import User_EditUsernamePage from './js/pages/User/EditUsernamePage';
import User_EditSelfIntroPage from './js/pages/User/EditSelfIntroPage';
import User_RelationshipsPage from './js/pages/User/RelationshipsPage';
import Group_GroupPage from './js/pages/Group/GroupPage';
import Sale_SquarePage from './js/pages/Sale/SquarePage';
import Sale_SalePage from './js/pages/Sale/SalePage';
import Sale_PersonalPage from './js/pages/Sale/PersonalPage';
import Sale_EditSalePage from './js/pages/Sale/EditSalePage';
import Other_OfficialAccountPage from './js/pages/Other/OfficialAccountPage';
import { WrapPhotoViewPage } from './js/pages/Common/PhotoViewPage';
const RootStackNavigator = createStackNavigator({
MainTabs,
KebiaoPage,
WechatArticlePage,
Common_LoginPage,
Common_RegisterPage,
Common_SettingPage,
Common_SearchPage,
Common_WebviewPage,
Common_MediumTransPage,
Status_StatusPage,
Status_TopicPage,
Status_NewStatusPage,
User_ChatPage,
User_QRCodePage,
User_MessagePage,
User_UserPage,
User_EditProfilePage,
User_EditUsernamePage,
User_EditSelfIntroPage,
User_RelationshipsPage,
Group_GroupPage,
Sale_SquarePage,
Sale_SalePage,
Sale_PersonalPage,
Sale_EditSalePage,
Other_OfficialAccountPage,
}, {
headerMode: 'screen',
headerLayoutPreset: 'center',
defaultNavigationOptions: ({ navigation }) => ({
headerStyle: {
paddingTop: Theme.statusBarHeight,
height: Theme.headerHeight + Theme.statusBarHeight,
elevation: 0,
shadowOpacity: 0,
backgroundColor: Theme.themeColor,
},
headerTitleStyle: {
fontWeight: 'normal',
fontSize: 18,
},
headerTintColor: '#ffffff',
gesturesEnabled: true,
headerBackImage: HeaderLeft,
}),
}
);
const RootStack = WrapPhotoViewPage(RootStackNavigator);
const AppContainer = createAppContainer(RootStack);
class App extends React.Component {
render() {
return (
<View style={{ flex: 1 }}>
<StatusBar translucent={true} backgroundColor='rgba(0,0,0,0)' barStyle="light-content" />
<AppContainer />
<MyToast ref={(ref) => { MyToast.setInstance(ref); }} />
<ContextMenu ref={(ref) => { ContextMenu.setInstance(ref); }} />
<SlideInMenu ref={(ref) => { SlideInMenu.setInstance(ref); }} />
<ModalMenu ref={(ref) => { ModalMenu.setInstance(ref); }} />
</View>
);
}
}
import { name as appName } from './app.json';
AppRegistry.registerComponent(appName, () => App);