2021-10-20 19:29:21 +00:00
|
|
|
import React from 'react';
|
2022-06-10 15:22:44 +00:00
|
|
|
import { Platform } from 'react-native';
|
2021-10-20 19:29:21 +00:00
|
|
|
|
2021-11-11 14:32:56 +00:00
|
|
|
import {
|
|
|
|
Icon,
|
|
|
|
IconHelp,
|
|
|
|
IconHome,
|
|
|
|
IconInfo,
|
|
|
|
IconSettings
|
2022-01-25 12:55:57 +00:00
|
|
|
} from '../../base/icons';
|
2022-02-08 15:09:22 +00:00
|
|
|
import BaseTheme from '../../base/ui/components/BaseTheme.native';
|
2021-10-20 19:29:21 +00:00
|
|
|
|
2022-01-25 12:55:57 +00:00
|
|
|
import { goBack } from './components/conference/ConferenceNavigationContainerRef';
|
2022-04-26 10:15:31 +00:00
|
|
|
import { goBack as goBackToLobbyScreen } from './components/lobby/LobbyNavigationContainerRef';
|
2022-06-16 09:49:07 +00:00
|
|
|
import { lobbyScreenHeaderCloseButton, screenHeaderCloseButton } from './functions';
|
|
|
|
import { goBack as goBackToWelcomeScreen } from './rootNavigationContainerRef';
|
2021-10-20 19:29:21 +00:00
|
|
|
|
2022-02-08 15:09:22 +00:00
|
|
|
|
2021-11-11 14:32:56 +00:00
|
|
|
/**
|
|
|
|
* Navigation container theme.
|
|
|
|
*/
|
|
|
|
export const navigationContainerTheme = {
|
|
|
|
colors: {
|
2022-05-12 13:16:59 +00:00
|
|
|
background: BaseTheme.palette.uiBackground
|
2021-11-11 14:32:56 +00:00
|
|
|
}
|
|
|
|
};
|
2021-10-20 19:29:21 +00:00
|
|
|
|
2021-11-11 14:32:56 +00:00
|
|
|
/**
|
|
|
|
* Drawer navigator screens options and transition types.
|
|
|
|
*/
|
|
|
|
export const drawerNavigatorScreenOptions = {
|
2022-06-08 13:26:04 +00:00
|
|
|
animation: 'default',
|
2021-11-11 14:32:56 +00:00
|
|
|
gestureEnabled: true,
|
|
|
|
headerShown: false
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Drawer screen options and transition types.
|
|
|
|
*/
|
|
|
|
export const drawerScreenOptions = {
|
2022-06-08 13:26:04 +00:00
|
|
|
animation: 'default',
|
2021-11-11 14:32:56 +00:00
|
|
|
gestureEnabled: true,
|
|
|
|
headerShown: true,
|
|
|
|
headerStyle: {
|
2022-05-02 09:15:37 +00:00
|
|
|
backgroundColor: BaseTheme.palette.screen02Header
|
2022-06-10 15:22:44 +00:00
|
|
|
},
|
|
|
|
orientation: Platform.select({
|
|
|
|
ios: 'default',
|
|
|
|
android: 'all'
|
|
|
|
})
|
2021-11-11 14:32:56 +00:00
|
|
|
};
|
|
|
|
|
2022-01-25 12:55:57 +00:00
|
|
|
/**
|
|
|
|
* Drawer content options.
|
|
|
|
*/
|
|
|
|
export const drawerContentOptions = {
|
2022-02-21 14:06:02 +00:00
|
|
|
drawerActiveBackgroundColor: BaseTheme.palette.uiBackground,
|
2022-01-25 12:55:57 +00:00
|
|
|
drawerActiveTintColor: BaseTheme.palette.screen01Header,
|
2022-02-21 14:06:02 +00:00
|
|
|
drawerInactiveTintColor: BaseTheme.palette.text02,
|
2022-01-25 12:55:57 +00:00
|
|
|
drawerLabelStyle: {
|
|
|
|
marginLeft: BaseTheme.spacing[2]
|
|
|
|
},
|
|
|
|
drawerStyle: {
|
2022-02-21 14:06:02 +00:00
|
|
|
backgroundColor: BaseTheme.palette.uiBackground,
|
2022-01-25 13:15:48 +00:00
|
|
|
maxWidth: 400,
|
|
|
|
width: '75%'
|
2022-01-25 12:55:57 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2021-11-11 14:32:56 +00:00
|
|
|
/**
|
|
|
|
* Screen options for welcome page.
|
|
|
|
*/
|
|
|
|
export const welcomeScreenOptions = {
|
|
|
|
...drawerScreenOptions,
|
|
|
|
drawerIcon: ({ focused }) => (
|
|
|
|
<Icon
|
2022-02-21 14:06:02 +00:00
|
|
|
color = { focused ? BaseTheme.palette.screen01Header : BaseTheme.palette.icon02 }
|
2021-11-11 14:32:56 +00:00
|
|
|
size = { 20 }
|
|
|
|
src = { IconHome } />
|
|
|
|
),
|
2022-05-02 09:15:37 +00:00
|
|
|
headerStyle: {
|
|
|
|
backgroundColor: BaseTheme.palette.screen01Header
|
|
|
|
},
|
2022-06-16 09:49:07 +00:00
|
|
|
headerTitleStyle: {
|
|
|
|
color: BaseTheme.palette.text01
|
|
|
|
}
|
2021-11-11 14:32:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Screen options for settings screen.
|
|
|
|
*/
|
|
|
|
export const settingsScreenOptions = {
|
|
|
|
...drawerScreenOptions,
|
|
|
|
drawerIcon: ({ focused }) => (
|
|
|
|
<Icon
|
2022-02-21 14:06:02 +00:00
|
|
|
color = { focused ? BaseTheme.palette.screen01Header : BaseTheme.palette.icon02 }
|
2021-11-11 14:32:56 +00:00
|
|
|
size = { 20 }
|
|
|
|
src = { IconSettings } />
|
|
|
|
),
|
|
|
|
headerTitleStyle: {
|
|
|
|
color: BaseTheme.palette.text01
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Screen options for terms/privacy screens.
|
|
|
|
*/
|
|
|
|
export const termsAndPrivacyScreenOptions = {
|
|
|
|
...drawerScreenOptions,
|
|
|
|
drawerIcon: ({ focused }) => (
|
|
|
|
<Icon
|
2022-02-21 14:06:02 +00:00
|
|
|
color = { focused ? BaseTheme.palette.screen01Header : BaseTheme.palette.icon02 }
|
2021-11-11 14:32:56 +00:00
|
|
|
size = { 20 }
|
|
|
|
src = { IconInfo } />
|
|
|
|
),
|
|
|
|
headerTitleStyle: {
|
|
|
|
color: BaseTheme.palette.text01
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Screen options for help screen.
|
|
|
|
*/
|
|
|
|
export const helpScreenOptions = {
|
|
|
|
...drawerScreenOptions,
|
|
|
|
drawerIcon: ({ focused }) => (
|
|
|
|
<Icon
|
2022-02-21 14:06:02 +00:00
|
|
|
color = { focused ? BaseTheme.palette.screen01Header : BaseTheme.palette.icon02 }
|
2021-11-11 14:32:56 +00:00
|
|
|
size = { 20 }
|
|
|
|
src = { IconHelp } />
|
|
|
|
),
|
|
|
|
headerTitleStyle: {
|
|
|
|
color: BaseTheme.palette.text01
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2021-10-20 19:29:21 +00:00
|
|
|
/**
|
|
|
|
* Screen options for conference.
|
|
|
|
*/
|
2022-06-08 13:26:04 +00:00
|
|
|
export const conferenceScreenOptions = {
|
|
|
|
animation: 'default',
|
|
|
|
gestureEnabled: false,
|
2022-06-10 15:22:44 +00:00
|
|
|
headerShown: false,
|
|
|
|
orientation: Platform.select({
|
|
|
|
ios: 'default',
|
|
|
|
android: 'all'
|
|
|
|
})
|
2022-06-08 13:26:04 +00:00
|
|
|
};
|
2021-10-20 19:29:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tab bar options for chat screen.
|
|
|
|
*/
|
|
|
|
export const chatTabBarOptions = {
|
2022-01-07 14:11:58 +00:00
|
|
|
tabBarActiveTintColor: BaseTheme.palette.screen01Header,
|
|
|
|
tabBarLabelStyle: {
|
2021-10-20 19:29:21 +00:00
|
|
|
fontSize: BaseTheme.typography.labelRegular.fontSize
|
|
|
|
},
|
2022-02-17 14:51:00 +00:00
|
|
|
tabBarInactiveTintColor: BaseTheme.palette.text01,
|
2022-01-07 14:11:58 +00:00
|
|
|
tabBarIndicatorStyle: {
|
2021-10-20 19:29:21 +00:00
|
|
|
backgroundColor: BaseTheme.palette.screen01Header
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Screen options for presentation type modals.
|
|
|
|
*/
|
|
|
|
export const presentationScreenOptions = {
|
|
|
|
headerBackTitleVisible: false,
|
2022-04-26 10:15:31 +00:00
|
|
|
headerLeft: () => screenHeaderCloseButton(goBack),
|
2021-10-20 19:29:21 +00:00
|
|
|
headerStatusBarHeight: 0,
|
|
|
|
headerStyle: {
|
2022-05-02 09:15:37 +00:00
|
|
|
backgroundColor: BaseTheme.palette.screen02Header
|
2021-10-20 19:29:21 +00:00
|
|
|
},
|
|
|
|
headerTitleStyle: {
|
|
|
|
color: BaseTheme.palette.text01
|
2022-06-10 15:22:44 +00:00
|
|
|
},
|
|
|
|
orientation: Platform.select({
|
|
|
|
ios: 'default',
|
|
|
|
android: 'all'
|
|
|
|
})
|
2021-10-20 19:29:21 +00:00
|
|
|
};
|
|
|
|
|
2022-05-06 10:14:10 +00:00
|
|
|
/**
|
|
|
|
* Screen options for car mode.
|
|
|
|
*/
|
2022-06-17 10:08:21 +00:00
|
|
|
export const carmodeScreenOptions = {
|
|
|
|
...presentationScreenOptions,
|
|
|
|
orientation: 'portrait'
|
|
|
|
};
|
2022-05-06 10:14:10 +00:00
|
|
|
|
2021-10-20 19:29:21 +00:00
|
|
|
/**
|
|
|
|
* Screen options for chat.
|
|
|
|
*/
|
2022-04-26 10:15:31 +00:00
|
|
|
export const chatScreenOptions = presentationScreenOptions;
|
2021-10-20 19:29:21 +00:00
|
|
|
|
2022-05-03 08:47:15 +00:00
|
|
|
/**
|
|
|
|
* Dial-IN Info screen options and transition types.
|
|
|
|
*/
|
|
|
|
export const dialInSummaryScreenOptions = {
|
|
|
|
...presentationScreenOptions,
|
2022-06-16 09:49:07 +00:00
|
|
|
animation: 'slide_from_bottom',
|
|
|
|
headerLeft: () => screenHeaderCloseButton(goBackToWelcomeScreen)
|
2022-05-03 08:47:15 +00:00
|
|
|
};
|
|
|
|
|
2021-10-20 19:29:21 +00:00
|
|
|
/**
|
|
|
|
* Screen options for invite modal.
|
|
|
|
*/
|
2022-04-26 10:15:31 +00:00
|
|
|
export const inviteScreenOptions = presentationScreenOptions;
|
2021-10-20 19:29:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Screen options for participants modal.
|
|
|
|
*/
|
2022-04-26 10:15:31 +00:00
|
|
|
export const participantsScreenOptions = presentationScreenOptions;
|
2021-10-20 19:29:21 +00:00
|
|
|
|
2021-11-10 17:49:53 +00:00
|
|
|
/**
|
|
|
|
* Screen options for speaker stats modal.
|
|
|
|
*/
|
2022-04-26 10:15:31 +00:00
|
|
|
export const speakerStatsScreenOptions = presentationScreenOptions;
|
2021-11-10 17:49:53 +00:00
|
|
|
|
2021-12-10 16:23:27 +00:00
|
|
|
/**
|
|
|
|
* Screen options for security options modal.
|
|
|
|
*/
|
2022-04-26 10:15:31 +00:00
|
|
|
export const securityScreenOptions = presentationScreenOptions;
|
2021-12-10 16:23:27 +00:00
|
|
|
|
2022-02-08 11:25:32 +00:00
|
|
|
/**
|
|
|
|
* Screen options for recording modal.
|
|
|
|
*/
|
2022-04-26 10:15:31 +00:00
|
|
|
export const recordingScreenOptions = presentationScreenOptions;
|
2022-02-08 11:25:32 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Screen options for live stream modal.
|
|
|
|
*/
|
2022-04-26 10:15:31 +00:00
|
|
|
export const liveStreamScreenOptions = presentationScreenOptions;
|
|
|
|
|
2022-05-02 11:00:31 +00:00
|
|
|
/**
|
|
|
|
* Screen options for lobby modal.
|
|
|
|
*/
|
2022-06-16 09:49:07 +00:00
|
|
|
export const lobbyScreenOptions = {
|
|
|
|
...presentationScreenOptions,
|
|
|
|
headerLeft: () => lobbyScreenHeaderCloseButton()
|
|
|
|
};
|
2022-05-02 11:00:31 +00:00
|
|
|
|
2022-04-26 10:15:31 +00:00
|
|
|
/**
|
|
|
|
* Screen options for lobby chat modal.
|
|
|
|
*/
|
|
|
|
export const lobbyChatScreenOptions = {
|
|
|
|
...presentationScreenOptions,
|
|
|
|
headerLeft: () => screenHeaderCloseButton(goBackToLobbyScreen)
|
2022-02-08 11:25:32 +00:00
|
|
|
};
|
|
|
|
|
2022-03-08 09:10:30 +00:00
|
|
|
/**
|
|
|
|
* Screen options for salesforce link modal.
|
|
|
|
*/
|
|
|
|
export const salesforceScreenOptions = presentationScreenOptions;
|
|
|
|
|
2022-03-30 13:54:03 +00:00
|
|
|
/**
|
|
|
|
* Screen options for GIPHY integration modal.
|
|
|
|
*/
|
|
|
|
export const gifsMenuOptions = presentationScreenOptions;
|
|
|
|
|
2021-10-20 19:29:21 +00:00
|
|
|
/**
|
|
|
|
* Screen options for shared document.
|
|
|
|
*/
|
|
|
|
export const sharedDocumentScreenOptions = {
|
2022-06-08 13:29:10 +00:00
|
|
|
animation: 'slide_from_right',
|
2021-10-20 19:29:21 +00:00
|
|
|
headerBackTitleVisible: false,
|
|
|
|
headerShown: true,
|
|
|
|
headerStyle: {
|
2022-05-02 09:15:37 +00:00
|
|
|
backgroundColor: BaseTheme.palette.screen02Header
|
2021-10-20 19:29:21 +00:00
|
|
|
},
|
|
|
|
headerTitleStyle: {
|
|
|
|
color: BaseTheme.palette.text01
|
2022-06-10 15:22:44 +00:00
|
|
|
},
|
|
|
|
orientation: Platform.select({
|
|
|
|
ios: 'default',
|
|
|
|
android: 'all'
|
|
|
|
})
|
2021-10-20 19:29:21 +00:00
|
|
|
};
|
2022-06-16 09:49:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Screen options for connecting screen.
|
|
|
|
*/
|
|
|
|
export const connectingScreenOptions = {
|
|
|
|
gestureEnabled: false,
|
|
|
|
headerShown: false
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Screen options for pre-join screen.
|
|
|
|
*/
|
|
|
|
export const preJoinScreenOptions = {
|
|
|
|
gestureEnabled: false,
|
|
|
|
headerStyle: {
|
|
|
|
backgroundColor: BaseTheme.palette.screen02Header
|
|
|
|
},
|
|
|
|
headerTitle: ''
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Screen options for conference navigation container screen.
|
|
|
|
*/
|
|
|
|
export const conferenceNavigationContainerScreenOptions = {
|
|
|
|
gestureEnabled: false,
|
|
|
|
headerShown: false
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Screen options for lobby navigation container screen.
|
|
|
|
*/
|
|
|
|
export const lobbyNavigationContainerScreenOptions = {
|
|
|
|
gestureEnabled: false,
|
|
|
|
headerShown: false
|
|
|
|
};
|