Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

screenOptions.js 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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. export const linkScreenOptions = {
  24. gestureEnabled: true,
  25. headerShown: true,
  26. headerTitleStyle: {
  27. color: BaseTheme.palette.text01
  28. }
  29. };
  30. /**
  31. * Navigation container theme.
  32. */
  33. export const navigationContainerTheme = {
  34. colors: {
  35. background: BaseTheme.palette.uiBackground
  36. }
  37. };
  38. /**
  39. * Screen options for welcome page.
  40. */
  41. export const welcomeScreenOptions = {
  42. ...TransitionPresets.ModalTransition,
  43. gestureEnabled: false,
  44. headerShown: true,
  45. headerStyle: {
  46. backgroundColor: BaseTheme.palette.screen01Header
  47. },
  48. headerTitleStyle: {
  49. color: BaseTheme.palette.text01
  50. }
  51. };
  52. /**
  53. * Screen options for conference.
  54. */
  55. export const conferenceScreenOptions = fullScreenOptions;
  56. /**
  57. * Tab bar options for chat screen.
  58. */
  59. export const chatTabBarOptions = {
  60. tabBarActiveTintColor: BaseTheme.palette.field02,
  61. tabBarLabelStyle: {
  62. fontSize: BaseTheme.typography.labelRegular.fontSize,
  63. textTransform: 'capitalize'
  64. },
  65. tabBarInactiveTintColor: BaseTheme.palette.text03,
  66. tabBarIndicatorStyle: {
  67. backgroundColor: BaseTheme.palette.field02
  68. },
  69. tabBarStyle: {
  70. backgroundColor: BaseTheme.palette.ui01,
  71. borderBottomColor: BaseTheme.palette.border05,
  72. borderBottomWidth: 1
  73. }
  74. };
  75. /**
  76. * Screen options for presentation type modals.
  77. */
  78. export const presentationScreenOptions = {
  79. ...modalPresentation,
  80. headerBackTitleVisible: false,
  81. headerLeft: () => screenHeaderCloseButton(goBack),
  82. headerStatusBarHeight: 0,
  83. headerStyle: {
  84. backgroundColor: BaseTheme.palette.screen02Header
  85. },
  86. headerTitleStyle: {
  87. color: BaseTheme.palette.text01
  88. }
  89. };
  90. /**
  91. * Screen options for car mode.
  92. */
  93. export const carmodeScreenOptions = presentationScreenOptions;
  94. /**
  95. * Screen options for chat.
  96. */
  97. export const chatScreenOptions = presentationScreenOptions;
  98. /**
  99. * Dial-IN Info screen options and transition types.
  100. */
  101. export const dialInSummaryScreenOptions = {
  102. ...presentationScreenOptions,
  103. headerLeft: () => screenHeaderCloseButton(goBackToWelcomeScreen)
  104. };
  105. /**
  106. * Screen options for invite modal.
  107. */
  108. export const inviteScreenOptions = 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 live stream modal.
  127. */
  128. export const liveStreamScreenOptions = 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 pre-join screen.
  168. */
  169. export const preJoinScreenOptions = {
  170. gestureEnabled: false,
  171. headerStyle: {
  172. backgroundColor: BaseTheme.palette.screen02Header
  173. },
  174. headerTitleStyle: {
  175. color: BaseTheme.palette.text01
  176. }
  177. };
  178. /**
  179. * Screen options for conference navigation container screen.
  180. */
  181. export const conferenceNavigationContainerScreenOptions = {
  182. gestureEnabled: false,
  183. headerShown: false
  184. };
  185. /**
  186. * Screen options for lobby navigation container screen.
  187. */
  188. export const lobbyNavigationContainerScreenOptions = {
  189. gestureEnabled: false,
  190. headerShown: false
  191. };
  192. /**
  193. * Screen options for settings navigation container screen.
  194. */
  195. export const settingsNavigationContainerScreenOptions = {
  196. gestureEnabled: true,
  197. headerShown: false
  198. };