您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

screenOptions.js 5.9KB

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