2020-02-03 12:17:59 +01:00
|
|
|
// @flow
|
|
|
|
|
2020-03-05 10:29:15 +01:00
|
|
|
import * as React from 'react';
|
|
|
|
import {createDrawerNavigator} from '@react-navigation/drawer';
|
|
|
|
import TabNavigator from './MainTabNavigator';
|
2020-02-03 12:17:59 +01:00
|
|
|
import SettingsScreen from '../screens/SettingsScreen';
|
|
|
|
import AboutScreen from '../screens/About/AboutScreen';
|
|
|
|
import AboutDependenciesScreen from '../screens/About/AboutDependenciesScreen';
|
|
|
|
import SelfMenuScreen from '../screens/SelfMenuScreen';
|
|
|
|
import AvailableRoomScreen from "../screens/Websites/AvailableRoomScreen";
|
|
|
|
import DebugScreen from '../screens/DebugScreen';
|
|
|
|
import Sidebar from "../components/Sidebar";
|
2020-03-05 10:29:15 +01:00
|
|
|
import {createStackNavigator, TransitionPresets} from "@react-navigation/stack";
|
2020-03-05 21:48:37 +01:00
|
|
|
import PerfHomeScreen from '../screens/PerfHomeScreen';
|
2020-02-03 12:17:59 +01:00
|
|
|
|
2020-03-05 10:29:15 +01:00
|
|
|
const AboutStack = createStackNavigator();
|
2020-02-03 12:17:59 +01:00
|
|
|
|
2020-03-05 10:29:15 +01:00
|
|
|
function AboutStackComponent() {
|
|
|
|
return (
|
|
|
|
<AboutStack.Navigator
|
|
|
|
initialRouteName="AboutScreen"
|
|
|
|
mode='card'
|
|
|
|
headerMode="none"
|
|
|
|
screenOptions={{
|
2020-02-04 19:42:40 +01:00
|
|
|
gestureEnabled: true,
|
|
|
|
cardOverlayEnabled: true,
|
|
|
|
...TransitionPresets.SlideFromRightIOS,
|
2020-03-05 10:29:15 +01:00
|
|
|
}}
|
|
|
|
>
|
|
|
|
<AboutStack.Screen
|
|
|
|
name="AboutScreen"
|
|
|
|
component={AboutScreen}
|
|
|
|
/>
|
|
|
|
<AboutStack.Screen
|
|
|
|
name="AboutDependenciesScreen"
|
|
|
|
component={AboutDependenciesScreen}
|
|
|
|
/>
|
|
|
|
<AboutStack.Screen
|
|
|
|
name="DebugScreen"
|
|
|
|
component={DebugScreen}
|
|
|
|
/>
|
|
|
|
</AboutStack.Navigator>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
const Drawer = createDrawerNavigator();
|
|
|
|
|
|
|
|
function getDrawerContent(nav) {
|
|
|
|
return <Sidebar navigation={nav}/>
|
2020-02-04 19:42:40 +01:00
|
|
|
}
|
|
|
|
|
2020-03-05 10:29:15 +01:00
|
|
|
export default function DrawerNavigator() {
|
|
|
|
return (
|
|
|
|
<Drawer.Navigator
|
|
|
|
initialRouteName={'Main'}
|
|
|
|
mode='card'
|
|
|
|
drawerContent={props => getDrawerContent(props.navigation)}
|
|
|
|
screenOptions={{
|
|
|
|
gestureEnabled: true,
|
|
|
|
cardOverlayEnabled: true,
|
|
|
|
...TransitionPresets.SlideFromRightIOS,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Drawer.Screen
|
|
|
|
name="Main"
|
|
|
|
component={TabNavigator}
|
|
|
|
>
|
|
|
|
</Drawer.Screen>
|
|
|
|
<Drawer.Screen
|
|
|
|
name="SettingsScreen"
|
|
|
|
component={SettingsScreen}
|
|
|
|
/>
|
|
|
|
<Drawer.Screen
|
|
|
|
name="AboutScreen"
|
|
|
|
component={AboutStackComponent}
|
|
|
|
/>
|
|
|
|
<Drawer.Screen
|
|
|
|
name="SelfMenuScreen"
|
|
|
|
component={SelfMenuScreen}
|
|
|
|
/>
|
|
|
|
<Drawer.Screen
|
|
|
|
name="AvailableRoomScreen"
|
|
|
|
component={AvailableRoomScreen}
|
|
|
|
/>
|
|
|
|
</Drawer.Navigator>
|
|
|
|
);
|
2020-02-03 12:17:59 +01:00
|
|
|
}
|
|
|
|
|
2020-03-05 21:48:37 +01:00
|
|
|
const basicStack = createStackNavigator();
|
|
|
|
|
|
|
|
function DrawerNavigator1() {
|
|
|
|
return (
|
|
|
|
<basicStack.Navigator
|
|
|
|
initialRouteName={'Main'}
|
|
|
|
mode='card'
|
|
|
|
screenOptions={{
|
|
|
|
gestureEnabled: true,
|
|
|
|
cardOverlayEnabled: true,
|
|
|
|
...TransitionPresets.SlideFromRightIOS,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<basicStack.Screen
|
|
|
|
name="Main"
|
|
|
|
component={TabNavigator}
|
|
|
|
/>
|
|
|
|
</basicStack.Navigator>
|
|
|
|
);
|
|
|
|
}
|