2017-11-14 22:49:17 +00:00
|
|
|
import { Platform } from 'react-native';
|
2017-11-23 19:12:06 +00:00
|
|
|
import { StackNavigator, DrawerNavigator } from 'react-navigation';
|
2017-09-21 17:08:00 +00:00
|
|
|
|
|
|
|
import Sidebar from '../../containers/Sidebar';
|
|
|
|
import RoomsListView from '../../views/RoomsListView';
|
|
|
|
import RoomView from '../../views/RoomView';
|
2018-02-19 21:19:39 +00:00
|
|
|
import RoomActionsView from '../../views/RoomActionsView';
|
2017-09-21 17:08:00 +00:00
|
|
|
import CreateChannelView from '../../views/CreateChannelView';
|
2017-09-25 13:15:28 +00:00
|
|
|
import SelectUsersView from '../../views/SelectUsersView';
|
2017-12-20 19:20:06 +00:00
|
|
|
import NewServerView from '../../views/NewServerView';
|
2018-02-19 21:19:39 +00:00
|
|
|
import StarredMessagesView from '../../views/StarredMessagesView';
|
|
|
|
import PinnedMessagesView from '../../views/PinnedMessagesView';
|
2018-03-02 15:11:34 +00:00
|
|
|
import MentionedMessagesView from '../../views/MentionedMessagesView';
|
|
|
|
import RoomMembersView from '../../views/RoomMembersView';
|
2017-09-21 17:08:00 +00:00
|
|
|
|
|
|
|
const AuthRoutes = StackNavigator(
|
|
|
|
{
|
|
|
|
RoomsList: {
|
2017-12-08 19:13:21 +00:00
|
|
|
screen: RoomsListView
|
2017-09-21 17:08:00 +00:00
|
|
|
},
|
|
|
|
Room: {
|
2017-12-08 19:13:21 +00:00
|
|
|
screen: RoomView
|
2017-09-21 17:08:00 +00:00
|
|
|
},
|
|
|
|
CreateChannel: {
|
|
|
|
screen: CreateChannelView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'Create Channel'
|
|
|
|
}
|
2017-09-25 13:15:28 +00:00
|
|
|
},
|
|
|
|
SelectUsers: {
|
|
|
|
screen: SelectUsersView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'Select Users'
|
|
|
|
}
|
2017-12-20 19:20:06 +00:00
|
|
|
},
|
|
|
|
AddServer: {
|
|
|
|
screen: NewServerView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'New server'
|
|
|
|
}
|
2018-02-19 21:19:39 +00:00
|
|
|
},
|
|
|
|
RoomActions: {
|
|
|
|
screen: RoomActionsView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'Actions',
|
|
|
|
headerTintColor: '#292E35'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
StarredMessages: {
|
|
|
|
screen: StarredMessagesView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'Starred Messages',
|
|
|
|
headerTintColor: '#292E35'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
PinnedMessages: {
|
|
|
|
screen: PinnedMessagesView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'Pinned Messages',
|
|
|
|
headerTintColor: '#292E35'
|
|
|
|
}
|
2018-03-02 15:11:34 +00:00
|
|
|
},
|
|
|
|
MentionedMessages: {
|
|
|
|
screen: MentionedMessagesView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'Mentioned Messages',
|
|
|
|
headerTintColor: '#292E35'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
RoomMembers: {
|
|
|
|
screen: RoomMembersView,
|
|
|
|
navigationOptions: {
|
|
|
|
title: 'Room Members',
|
|
|
|
headerTintColor: '#292E35'
|
|
|
|
}
|
2017-09-21 17:08:00 +00:00
|
|
|
}
|
|
|
|
},
|
2017-12-11 20:37:33 +00:00
|
|
|
{
|
|
|
|
navigationOptions: {
|
|
|
|
headerTitleAllowFontScaling: false
|
|
|
|
}
|
|
|
|
}
|
2017-09-21 17:08:00 +00:00
|
|
|
);
|
|
|
|
|
2017-09-25 13:15:28 +00:00
|
|
|
const Routes = DrawerNavigator(
|
|
|
|
{
|
|
|
|
Home: {
|
2017-12-08 19:13:21 +00:00
|
|
|
screen: AuthRoutes
|
2017-09-21 17:08:00 +00:00
|
|
|
}
|
2017-09-25 13:15:28 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
contentComponent: Sidebar,
|
2017-11-14 22:49:17 +00:00
|
|
|
navigationOptions: {
|
|
|
|
drawerLockMode: Platform.OS === 'ios' ? 'locked-closed' : 'unlocked'
|
|
|
|
}
|
2017-09-21 17:08:00 +00:00
|
|
|
}
|
2017-09-25 13:15:28 +00:00
|
|
|
);
|
2017-09-21 17:08:00 +00:00
|
|
|
|
|
|
|
export default Routes;
|