You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

screenOptions.ts 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. import { TransitionPresets } from '@react-navigation/stack';
  2. import { Platform } from 'react-native';
  3. import BaseTheme from '../../base/ui/components/BaseTheme.native';
  4. import { goBack } from './components/conference/ConferenceNavigationContainerRef';
  5. import { goBack as goBackToLobbyScreen } from './components/lobby/LobbyNavigationContainerRef';
  6. import { lobbyScreenHeaderCloseButton, screenHeaderCloseButton } from './functions';
  7. import { goBack as goBackToWelcomeScreen } from './rootNavigationContainerRef';
  8. /**
  9. * Default modal transition for the current platform.
  10. */
  11. export const modalPresentation = Platform.select({
  12. ios: TransitionPresets.ModalPresentationIOS,
  13. default: TransitionPresets.DefaultTransition
  14. });
  15. /**
  16. * Screen options and transition types.
  17. */
  18. export const fullScreenOptions = {
  19. ...TransitionPresets.ModalTransition,
  20. gestureEnabled: false,
  21. headerShown: false
  22. };
  23. /**
  24. * Navigation container theme.
  25. */
  26. export const navigationContainerTheme = {
  27. colors: {
  28. background: BaseTheme.palette.uiBackground
  29. }
  30. };
  31. /**
  32. * Screen options for welcome page.
  33. */
  34. export const welcomeScreenOptions = {
  35. ...TransitionPresets.ModalTransition,
  36. gestureEnabled: false,
  37. headerShown: true,
  38. headerStyle: {
  39. backgroundColor: BaseTheme.palette.ui01
  40. },
  41. headerTitleStyle: {
  42. color: BaseTheme.palette.text01
  43. }
  44. };
  45. /**
  46. * Screen options for conference.
  47. */
  48. export const conferenceScreenOptions = fullScreenOptions;
  49. /**
  50. * Tab bar options for chat screen.
  51. */
  52. export const chatTabBarOptions = {
  53. swipeEnabled: false,
  54. tabBarIndicatorStyle: {
  55. backgroundColor: BaseTheme.palette.link01Active
  56. },
  57. tabBarStyle: {
  58. backgroundColor: BaseTheme.palette.ui01,
  59. borderBottomColor: BaseTheme.palette.ui06,
  60. borderBottomWidth: 0.4
  61. }
  62. };
  63. /**
  64. * Screen options for presentation type modals.
  65. */
  66. export const presentationScreenOptions = {
  67. ...modalPresentation,
  68. headerBackTitleVisible: false,
  69. headerLeft: () => screenHeaderCloseButton(goBack),
  70. headerStatusBarHeight: 0,
  71. headerStyle: {
  72. backgroundColor: BaseTheme.palette.ui01
  73. },
  74. headerTitleStyle: {
  75. color: BaseTheme.palette.text01
  76. }
  77. };
  78. /**
  79. * Screen options for breakout rooms screen.
  80. */
  81. export const breakoutRoomsScreenOptions = presentationScreenOptions;
  82. /**
  83. * Screen options for car mode.
  84. */
  85. export const carmodeScreenOptions = presentationScreenOptions;
  86. /**
  87. * Screen options for chat.
  88. */
  89. export const chatScreenOptions = presentationScreenOptions;
  90. /**
  91. * Dial-IN Info screen options and transition types.
  92. */
  93. export const dialInSummaryScreenOptions = {
  94. ...presentationScreenOptions,
  95. headerLeft: () => screenHeaderCloseButton(goBackToWelcomeScreen)
  96. };
  97. /**
  98. * Screen options for invite modal.
  99. */
  100. export const inviteScreenOptions = presentationScreenOptions;
  101. /**
  102. * Screen options for live stream modal.
  103. */
  104. export const liveStreamScreenOptions = presentationScreenOptions;
  105. /**
  106. * Screen options for participants modal.
  107. */
  108. export const participantsScreenOptions = presentationScreenOptions;
  109. /**
  110. * Screen options for speaker stats modal.
  111. */
  112. export const speakerStatsScreenOptions = presentationScreenOptions;
  113. /**
  114. * Screen options for security options modal.
  115. */
  116. export const securityScreenOptions = presentationScreenOptions;
  117. /**
  118. * Screen options for recording modal.
  119. */
  120. export const recordingScreenOptions = presentationScreenOptions;
  121. /**
  122. * Screen options for subtitles modal.
  123. */
  124. export const subtitlesScreenOptions = presentationScreenOptions;
  125. /**
  126. * Screen options for lobby modal.
  127. */
  128. export const lobbyScreenOptions = {
  129. ...presentationScreenOptions,
  130. headerLeft: () => lobbyScreenHeaderCloseButton()
  131. };
  132. /**
  133. * Screen options for lobby chat modal.
  134. */
  135. export const lobbyChatScreenOptions = {
  136. ...presentationScreenOptions,
  137. headerLeft: () => screenHeaderCloseButton(goBackToLobbyScreen)
  138. };
  139. /**
  140. * Screen options for salesforce link modal.
  141. */
  142. export const salesforceScreenOptions = presentationScreenOptions;
  143. /**
  144. * Screen options for GIPHY integration modal.
  145. */
  146. export const gifsMenuOptions = presentationScreenOptions;
  147. /**
  148. * Screen options for shared document.
  149. */
  150. export const sharedDocumentScreenOptions = presentationScreenOptions;
  151. /**
  152. * Screen options for settings modal.
  153. */
  154. export const settingsScreenOptions = presentationScreenOptions;
  155. /**
  156. * Screen options for connecting screen.
  157. */
  158. export const connectingScreenOptions = {
  159. gestureEnabled: false,
  160. headerShown: false
  161. };
  162. /**
  163. * Screen options for pre-join screen.
  164. */
  165. export const preJoinScreenOptions = {
  166. gestureEnabled: false,
  167. headerStyle: {
  168. backgroundColor: BaseTheme.palette.ui01
  169. },
  170. headerTitleStyle: {
  171. color: BaseTheme.palette.text01
  172. }
  173. };
  174. /**
  175. * Screen options for profile setting.
  176. */
  177. export const profileSettingsScreenOptions = {
  178. headerStyle: {
  179. backgroundColor: BaseTheme.palette.ui01
  180. },
  181. headerTitleStyle: {
  182. color: BaseTheme.palette.text01
  183. },
  184. headerBackTitleVisible: false
  185. };
  186. /**
  187. * Screen options for language select screen.
  188. */
  189. export const languageSelectScreenOptions = profileSettingsScreenOptions;
  190. /**
  191. * Screen options for pre-join screen.
  192. */
  193. export const unsafeMeetingScreenOptions = preJoinScreenOptions;
  194. /**
  195. * Screen options for conference navigation container screen.
  196. */
  197. export const conferenceNavigationContainerScreenOptions = {
  198. gestureEnabled: false,
  199. headerShown: false
  200. };
  201. /**
  202. * Screen options for lobby navigation container screen.
  203. */
  204. export const lobbyNavigationContainerScreenOptions = {
  205. gestureEnabled: false,
  206. headerShown: false
  207. };
  208. /**
  209. * Screen options for settings navigation container screen.
  210. */
  211. export const settingsNavigationContainerScreenOptions = {
  212. gestureEnabled: true,
  213. headerShown: false
  214. };