2021-10-20 19:29:21 +00:00
|
|
|
import { TransitionPresets } from '@react-navigation/stack';
|
|
|
|
import React from 'react';
|
|
|
|
import { Platform } from 'react-native';
|
|
|
|
|
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';
|
|
|
|
import { screenHeaderCloseButton } from './functions';
|
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
|
|
|
|
|
|
|
/**
|
|
|
|
* Default modal transition for the current platform.
|
|
|
|
*/
|
|
|
|
export const conferenceModalPresentation = Platform.select({
|
|
|
|
ios: TransitionPresets.ModalPresentationIOS,
|
|
|
|
default: TransitionPresets.DefaultTransition
|
|
|
|
});
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Screen options and transition types.
|
|
|
|
*/
|
2021-11-11 14:32:56 +00:00
|
|
|
export const fullScreenOptions = {
|
2021-10-20 19:29:21 +00:00
|
|
|
...TransitionPresets.ModalTransition,
|
|
|
|
gestureEnabled: false,
|
|
|
|
headerShown: false
|
|
|
|
};
|
|
|
|
|
2021-11-11 14:32:56 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Drawer navigator screens options and transition types.
|
|
|
|
*/
|
|
|
|
export const drawerNavigatorScreenOptions = {
|
|
|
|
...TransitionPresets.ModalTransition,
|
|
|
|
gestureEnabled: true,
|
|
|
|
headerShown: false
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Drawer screen options and transition types.
|
|
|
|
*/
|
|
|
|
export const drawerScreenOptions = {
|
|
|
|
...TransitionPresets.ModalTransition,
|
|
|
|
gestureEnabled: true,
|
|
|
|
headerShown: true,
|
|
|
|
headerStyle: {
|
2022-05-02 09:15:37 +00:00
|
|
|
backgroundColor: BaseTheme.palette.screen02Header
|
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
|
|
|
|
},
|
|
|
|
// eslint-disable-next-line no-empty-function
|
|
|
|
headerTitle: () => {}
|
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-04-26 10:15:31 +00:00
|
|
|
export const conferenceScreenOptions = fullScreenOptions;
|
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 = {
|
|
|
|
...conferenceModalPresentation,
|
|
|
|
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-05-06 10:14:10 +00:00
|
|
|
/**
|
|
|
|
* Screen options for car mode.
|
|
|
|
*/
|
|
|
|
export const carmodeScreenOptions = presentationScreenOptions;
|
|
|
|
|
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,
|
|
|
|
headerLeft: undefined
|
|
|
|
};
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
export const lobbyScreenOptions = presentationScreenOptions;
|
|
|
|
|
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 = {
|
|
|
|
...TransitionPresets.DefaultTransition,
|
|
|
|
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
|
|
|
|
}
|
|
|
|
};
|