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 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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. * Screen options for visitors queue.
  51. */
  52. export const visitorsScreenOptions = fullScreenOptions;
  53. /**
  54. * Tab bar options for chat screen.
  55. */
  56. export const chatTabBarOptions = {
  57. swipeEnabled: false,
  58. tabBarIndicatorStyle: {
  59. backgroundColor: BaseTheme.palette.link01Active
  60. },
  61. tabBarStyle: {
  62. backgroundColor: BaseTheme.palette.ui01,
  63. borderBottomColor: BaseTheme.palette.ui06,
  64. borderBottomWidth: 0.4
  65. }
  66. };
  67. /**
  68. * Screen options for presentation type modals.
  69. */
  70. export const presentationScreenOptions = {
  71. ...modalPresentation,
  72. headerBackTitleVisible: false,
  73. headerLeft: () => screenHeaderCloseButton(goBack),
  74. headerStatusBarHeight: 0,
  75. headerStyle: {
  76. backgroundColor: BaseTheme.palette.ui01
  77. },
  78. headerTitleStyle: {
  79. color: BaseTheme.palette.text01
  80. }
  81. };
  82. /**
  83. * Screen options for breakout rooms screen.
  84. */
  85. export const breakoutRoomsScreenOptions = presentationScreenOptions;
  86. /**
  87. * Screen options for car mode.
  88. */
  89. export const carmodeScreenOptions = presentationScreenOptions;
  90. /**
  91. * Screen options for chat.
  92. */
  93. export const chatScreenOptions = presentationScreenOptions;
  94. /**
  95. * Dial-IN Info screen options and transition types.
  96. */
  97. export const dialInSummaryScreenOptions = {
  98. ...presentationScreenOptions,
  99. headerLeft: () => screenHeaderCloseButton(goBackToWelcomeScreen)
  100. };
  101. /**
  102. * Screen options for invite modal.
  103. */
  104. export const inviteScreenOptions = presentationScreenOptions;
  105. /**
  106. * Screen options for live stream modal.
  107. */
  108. export const liveStreamScreenOptions = presentationScreenOptions;
  109. /**
  110. * Screen options for participants modal.
  111. */
  112. export const participantsScreenOptions = presentationScreenOptions;
  113. /**
  114. * Screen options for speaker stats modal.
  115. */
  116. export const speakerStatsScreenOptions = presentationScreenOptions;
  117. /**
  118. * Screen options for security options modal.
  119. */
  120. export const securityScreenOptions = presentationScreenOptions;
  121. /**
  122. * Screen options for recording modal.
  123. */
  124. export const recordingScreenOptions = presentationScreenOptions;
  125. /**
  126. * Screen options for subtitles modal.
  127. */
  128. export const subtitlesScreenOptions = presentationScreenOptions;
  129. /**
  130. * Screen options for lobby modal.
  131. */
  132. export const lobbyScreenOptions = {
  133. ...presentationScreenOptions,
  134. headerLeft: () => lobbyScreenHeaderCloseButton()
  135. };
  136. /**
  137. * Screen options for lobby chat modal.
  138. */
  139. export const lobbyChatScreenOptions = {
  140. ...presentationScreenOptions,
  141. headerLeft: () => screenHeaderCloseButton(goBackToLobbyScreen)
  142. };
  143. /**
  144. * Screen options for salesforce link modal.
  145. */
  146. export const salesforceScreenOptions = presentationScreenOptions;
  147. /**
  148. * Screen options for GIPHY integration modal.
  149. */
  150. export const gifsMenuOptions = presentationScreenOptions;
  151. /**
  152. * Screen options for shared document.
  153. */
  154. export const sharedDocumentScreenOptions = presentationScreenOptions;
  155. /**
  156. * Screen options for settings modal.
  157. */
  158. export const settingsScreenOptions = presentationScreenOptions;
  159. /**
  160. * Screen options for connecting screen.
  161. */
  162. export const connectingScreenOptions = {
  163. gestureEnabled: false,
  164. headerShown: false
  165. };
  166. /**
  167. * Screen options for the whiteboard screen.
  168. */
  169. export const whiteboardScreenOptions = presentationScreenOptions;
  170. /**
  171. * Screen options for pre-join screen.
  172. */
  173. export const preJoinScreenOptions = {
  174. gestureEnabled: false,
  175. headerStyle: {
  176. backgroundColor: BaseTheme.palette.ui01
  177. },
  178. headerTitleStyle: {
  179. color: BaseTheme.palette.text01
  180. }
  181. };
  182. /**
  183. * Screen options for profile setting.
  184. */
  185. export const profileSettingsScreenOptions = {
  186. headerStyle: {
  187. backgroundColor: BaseTheme.palette.ui01
  188. },
  189. headerTitleStyle: {
  190. color: BaseTheme.palette.text01
  191. },
  192. headerBackTitleVisible: false
  193. };
  194. /**
  195. * Screen options for language select screen.
  196. */
  197. export const languageSelectScreenOptions = profileSettingsScreenOptions;
  198. /**
  199. * Screen options for pre-join screen.
  200. */
  201. export const unsafeMeetingScreenOptions = preJoinScreenOptions;
  202. /**
  203. * Screen options for conference navigation container screen.
  204. */
  205. export const conferenceNavigationContainerScreenOptions = {
  206. gestureEnabled: false,
  207. headerShown: false
  208. };
  209. /**
  210. * Screen options for lobby navigation container screen.
  211. */
  212. export const lobbyNavigationContainerScreenOptions = {
  213. gestureEnabled: false,
  214. headerShown: false
  215. };
  216. /**
  217. * Screen options for settings navigation container screen.
  218. */
  219. export const settingsNavigationContainerScreenOptions = {
  220. ...modalPresentation,
  221. gestureEnabled: true,
  222. headerShown: false
  223. };