Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

screenOptions.js 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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.screen02Header
  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.border05,
  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.screen02Header
  73. },
  74. headerTitleStyle: {
  75. color: BaseTheme.palette.text01
  76. }
  77. };
  78. /**
  79. * Screen options for car mode.
  80. */
  81. export const carmodeScreenOptions = presentationScreenOptions;
  82. /**
  83. * Screen options for chat.
  84. */
  85. export const chatScreenOptions = presentationScreenOptions;
  86. /**
  87. * Dial-IN Info screen options and transition types.
  88. */
  89. export const dialInSummaryScreenOptions = {
  90. ...presentationScreenOptions,
  91. headerLeft: () => screenHeaderCloseButton(goBackToWelcomeScreen)
  92. };
  93. /**
  94. * Screen options for invite modal.
  95. */
  96. export const inviteScreenOptions = presentationScreenOptions;
  97. /**
  98. * Screen options for participants modal.
  99. */
  100. export const participantsScreenOptions = presentationScreenOptions;
  101. /**
  102. * Screen options for speaker stats modal.
  103. */
  104. export const speakerStatsScreenOptions = presentationScreenOptions;
  105. /**
  106. * Screen options for security options modal.
  107. */
  108. export const securityScreenOptions = presentationScreenOptions;
  109. /**
  110. * Screen options for recording modal.
  111. */
  112. export const recordingScreenOptions = presentationScreenOptions;
  113. /**
  114. * Screen options for live stream modal.
  115. */
  116. export const liveStreamScreenOptions = presentationScreenOptions;
  117. /**
  118. * Screen options for lobby modal.
  119. */
  120. export const lobbyScreenOptions = {
  121. ...presentationScreenOptions,
  122. headerLeft: () => lobbyScreenHeaderCloseButton()
  123. };
  124. /**
  125. * Screen options for lobby chat modal.
  126. */
  127. export const lobbyChatScreenOptions = {
  128. ...presentationScreenOptions,
  129. headerLeft: () => screenHeaderCloseButton(goBackToLobbyScreen)
  130. };
  131. /**
  132. * Screen options for salesforce link modal.
  133. */
  134. export const salesforceScreenOptions = presentationScreenOptions;
  135. /**
  136. * Screen options for GIPHY integration modal.
  137. */
  138. export const gifsMenuOptions = presentationScreenOptions;
  139. /**
  140. * Screen options for shared document.
  141. */
  142. export const sharedDocumentScreenOptions = presentationScreenOptions;
  143. /**
  144. * Screen options for settings modal.
  145. */
  146. export const settingsScreenOptions = presentationScreenOptions;
  147. /**
  148. * Screen options for connecting screen.
  149. */
  150. export const connectingScreenOptions = {
  151. gestureEnabled: false,
  152. headerShown: false
  153. };
  154. /**
  155. * Screen options for pre-join screen.
  156. */
  157. export const preJoinScreenOptions = {
  158. gestureEnabled: false,
  159. headerStyle: {
  160. backgroundColor: BaseTheme.palette.screen02Header
  161. },
  162. headerTitleStyle: {
  163. color: BaseTheme.palette.text01
  164. }
  165. };
  166. /**
  167. * Screen options for conference navigation container screen.
  168. */
  169. export const conferenceNavigationContainerScreenOptions = {
  170. gestureEnabled: false,
  171. headerShown: false
  172. };
  173. /**
  174. * Screen options for lobby navigation container screen.
  175. */
  176. export const lobbyNavigationContainerScreenOptions = {
  177. gestureEnabled: false,
  178. headerShown: false
  179. };
  180. /**
  181. * Screen options for settings navigation container screen.
  182. */
  183. export const settingsNavigationContainerScreenOptions = {
  184. gestureEnabled: true,
  185. headerShown: false
  186. };