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.js 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. import React from 'react';
  2. import { Platform } from 'react-native';
  3. import {
  4. Icon,
  5. IconHelp,
  6. IconHome,
  7. IconInfo,
  8. IconSettings
  9. } from '../../base/icons';
  10. import BaseTheme from '../../base/ui/components/BaseTheme.native';
  11. import { goBack } from './components/conference/ConferenceNavigationContainerRef';
  12. import { goBack as goBackToLobbyScreen } from './components/lobby/LobbyNavigationContainerRef';
  13. import { screenHeaderCloseButton } from './functions';
  14. /**
  15. * Navigation container theme.
  16. */
  17. export const navigationContainerTheme = {
  18. colors: {
  19. background: BaseTheme.palette.uiBackground
  20. }
  21. };
  22. /**
  23. * Drawer navigator screens options and transition types.
  24. */
  25. export const drawerNavigatorScreenOptions = {
  26. animation: 'default',
  27. gestureEnabled: true,
  28. headerShown: false
  29. };
  30. /**
  31. * Drawer screen options and transition types.
  32. */
  33. export const drawerScreenOptions = {
  34. animation: 'default',
  35. gestureEnabled: true,
  36. headerShown: true,
  37. headerStyle: {
  38. backgroundColor: BaseTheme.palette.screen02Header
  39. },
  40. orientation: Platform.select({
  41. ios: 'default',
  42. android: 'all'
  43. })
  44. };
  45. /**
  46. * Drawer content options.
  47. */
  48. export const drawerContentOptions = {
  49. drawerActiveBackgroundColor: BaseTheme.palette.uiBackground,
  50. drawerActiveTintColor: BaseTheme.palette.screen01Header,
  51. drawerInactiveTintColor: BaseTheme.palette.text02,
  52. drawerLabelStyle: {
  53. marginLeft: BaseTheme.spacing[2]
  54. },
  55. drawerStyle: {
  56. backgroundColor: BaseTheme.palette.uiBackground,
  57. maxWidth: 400,
  58. width: '75%'
  59. }
  60. };
  61. /**
  62. * Screen options for welcome page.
  63. */
  64. export const welcomeScreenOptions = {
  65. ...drawerScreenOptions,
  66. drawerIcon: ({ focused }) => (
  67. <Icon
  68. color = { focused ? BaseTheme.palette.screen01Header : BaseTheme.palette.icon02 }
  69. size = { 20 }
  70. src = { IconHome } />
  71. ),
  72. headerStyle: {
  73. backgroundColor: BaseTheme.palette.screen01Header
  74. },
  75. // eslint-disable-next-line no-empty-function
  76. headerTitle: () => {}
  77. };
  78. /**
  79. * Screen options for settings screen.
  80. */
  81. export const settingsScreenOptions = {
  82. ...drawerScreenOptions,
  83. drawerIcon: ({ focused }) => (
  84. <Icon
  85. color = { focused ? BaseTheme.palette.screen01Header : BaseTheme.palette.icon02 }
  86. size = { 20 }
  87. src = { IconSettings } />
  88. ),
  89. headerTitleStyle: {
  90. color: BaseTheme.palette.text01
  91. }
  92. };
  93. /**
  94. * Screen options for terms/privacy screens.
  95. */
  96. export const termsAndPrivacyScreenOptions = {
  97. ...drawerScreenOptions,
  98. drawerIcon: ({ focused }) => (
  99. <Icon
  100. color = { focused ? BaseTheme.palette.screen01Header : BaseTheme.palette.icon02 }
  101. size = { 20 }
  102. src = { IconInfo } />
  103. ),
  104. headerTitleStyle: {
  105. color: BaseTheme.palette.text01
  106. }
  107. };
  108. /**
  109. * Screen options for help screen.
  110. */
  111. export const helpScreenOptions = {
  112. ...drawerScreenOptions,
  113. drawerIcon: ({ focused }) => (
  114. <Icon
  115. color = { focused ? BaseTheme.palette.screen01Header : BaseTheme.palette.icon02 }
  116. size = { 20 }
  117. src = { IconHelp } />
  118. ),
  119. headerTitleStyle: {
  120. color: BaseTheme.palette.text01
  121. }
  122. };
  123. /**
  124. * Screen options for conference.
  125. */
  126. export const conferenceScreenOptions = {
  127. animation: 'default',
  128. gestureEnabled: false,
  129. headerShown: false,
  130. orientation: Platform.select({
  131. ios: 'default',
  132. android: 'all'
  133. })
  134. };
  135. /**
  136. * Tab bar options for chat screen.
  137. */
  138. export const chatTabBarOptions = {
  139. tabBarActiveTintColor: BaseTheme.palette.screen01Header,
  140. tabBarLabelStyle: {
  141. fontSize: BaseTheme.typography.labelRegular.fontSize
  142. },
  143. tabBarInactiveTintColor: BaseTheme.palette.text01,
  144. tabBarIndicatorStyle: {
  145. backgroundColor: BaseTheme.palette.screen01Header
  146. }
  147. };
  148. /**
  149. * Screen options for presentation type modals.
  150. */
  151. export const presentationScreenOptions = {
  152. animation: 'slide_from_right',
  153. headerBackTitleVisible: false,
  154. headerLeft: () => screenHeaderCloseButton(goBack),
  155. headerStatusBarHeight: 0,
  156. headerStyle: {
  157. backgroundColor: BaseTheme.palette.screen02Header
  158. },
  159. headerTitleStyle: {
  160. color: BaseTheme.palette.text01
  161. },
  162. orientation: Platform.select({
  163. ios: 'default',
  164. android: 'all'
  165. })
  166. };
  167. /**
  168. * Screen options for car mode.
  169. */
  170. export const carmodeScreenOptions = presentationScreenOptions;
  171. /**
  172. * Screen options for chat.
  173. */
  174. export const chatScreenOptions = presentationScreenOptions;
  175. /**
  176. * Dial-IN Info screen options and transition types.
  177. */
  178. export const dialInSummaryScreenOptions = {
  179. ...presentationScreenOptions,
  180. headerLeft: undefined
  181. };
  182. /**
  183. * Screen options for invite modal.
  184. */
  185. export const inviteScreenOptions = presentationScreenOptions;
  186. /**
  187. * Screen options for participants modal.
  188. */
  189. export const participantsScreenOptions = presentationScreenOptions;
  190. /**
  191. * Screen options for speaker stats modal.
  192. */
  193. export const speakerStatsScreenOptions = presentationScreenOptions;
  194. /**
  195. * Screen options for security options modal.
  196. */
  197. export const securityScreenOptions = presentationScreenOptions;
  198. /**
  199. * Screen options for recording modal.
  200. */
  201. export const recordingScreenOptions = presentationScreenOptions;
  202. /**
  203. * Screen options for live stream modal.
  204. */
  205. export const liveStreamScreenOptions = presentationScreenOptions;
  206. /**
  207. * Screen options for lobby modal.
  208. */
  209. export const lobbyScreenOptions = presentationScreenOptions;
  210. /**
  211. * Screen options for lobby chat modal.
  212. */
  213. export const lobbyChatScreenOptions = {
  214. ...presentationScreenOptions,
  215. headerLeft: () => screenHeaderCloseButton(goBackToLobbyScreen)
  216. };
  217. /**
  218. * Screen options for salesforce link modal.
  219. */
  220. export const salesforceScreenOptions = presentationScreenOptions;
  221. /**
  222. * Screen options for GIPHY integration modal.
  223. */
  224. export const gifsMenuOptions = presentationScreenOptions;
  225. /**
  226. * Screen options for shared document.
  227. */
  228. export const sharedDocumentScreenOptions = {
  229. animation: 'slide_from_right',
  230. headerBackTitleVisible: false,
  231. headerShown: true,
  232. headerStyle: {
  233. backgroundColor: BaseTheme.palette.screen02Header
  234. },
  235. headerTitleStyle: {
  236. color: BaseTheme.palette.text01
  237. },
  238. orientation: Platform.select({
  239. ios: 'default',
  240. android: 'all'
  241. })
  242. };