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

styles.js 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. // @flow
  2. import { Dimensions, StyleSheet } from 'react-native';
  3. import { BoxModel, ColorPalette } from '../../base/styles';
  4. export const PLACEHOLDER_TEXT_COLOR = 'rgba(255, 255, 255, 0.5)';
  5. export const SIDEBAR_AVATAR_SIZE = 100;
  6. const SIDEBAR_HEADER_HEIGHT = 150;
  7. export const SWITCH_THUMB_COLOR = ColorPalette.blueHighlight;
  8. export const SWITCH_UNDER_COLOR = 'rgba(0, 0, 0, 0.4)';
  9. /**
  10. * The default color of text on the WelcomePage.
  11. */
  12. const TEXT_COLOR = ColorPalette.white;
  13. /**
  14. * The styles of the React {@code Components} of the feature welcome including
  15. * {@code WelcomePage} and {@code BlankPage}.
  16. */
  17. export default {
  18. /**
  19. * The audio-video switch itself.
  20. */
  21. audioVideoSwitch: {
  22. marginHorizontal: 5
  23. },
  24. /**
  25. * View that contains the audio-video switch and the labels.
  26. */
  27. audioVideoSwitchContainer: {
  28. alignItems: 'center',
  29. flexDirection: 'row'
  30. },
  31. /**
  32. * View that is rendered when there is no welcome page.
  33. */
  34. blankPageWrapper: {
  35. ...StyleSheet.absoluteFillObject,
  36. alignItems: 'center',
  37. flex: 1,
  38. flexDirection: 'column',
  39. justifyContent: 'center'
  40. },
  41. /**
  42. * Join button style.
  43. */
  44. button: {
  45. backgroundColor: ColorPalette.blue,
  46. borderColor: ColorPalette.blue,
  47. borderRadius: 4,
  48. borderWidth: 1,
  49. height: 30,
  50. justifyContent: 'center',
  51. paddingHorizontal: 20
  52. },
  53. /**
  54. * Join button text style.
  55. */
  56. buttonText: {
  57. alignSelf: 'center',
  58. color: ColorPalette.white,
  59. fontSize: 14
  60. },
  61. /**
  62. * The style of the display name label in the side bar.
  63. */
  64. displayName: {
  65. color: ColorPalette.white,
  66. fontSize: 16,
  67. marginTop: BoxModel.margin,
  68. textAlign: 'center'
  69. },
  70. enterRoomText: {
  71. color: TEXT_COLOR,
  72. fontSize: 18,
  73. marginBottom: BoxModel.margin
  74. },
  75. /**
  76. * The welcome screen header style.
  77. */
  78. header: {
  79. justifyContent: 'space-between'
  80. },
  81. /**
  82. * Container for the button on the hint box.
  83. */
  84. hintButtonContainer: {
  85. flexDirection: 'row',
  86. justifyContent: 'center'
  87. },
  88. /**
  89. * Container for the hint box.
  90. */
  91. hintContainer: {
  92. flexDirection: 'column',
  93. overflow: 'hidden'
  94. },
  95. /**
  96. * The text of the hint box.
  97. */
  98. hintText: {
  99. textAlign: 'center'
  100. },
  101. /**
  102. * Container for the text on the hint box.
  103. */
  104. hintTextContainer: {
  105. marginBottom: 2 * BoxModel.margin
  106. },
  107. /**
  108. * Container for the items in the side bar.
  109. */
  110. itemContainer: {
  111. flexDirection: 'column',
  112. paddingTop: 10
  113. },
  114. /**
  115. * A view that contains the field and hint box.
  116. */
  117. joinControls: {
  118. padding: BoxModel.padding
  119. },
  120. messageContainer: {
  121. backgroundColor: ColorPalette.white,
  122. borderColor: ColorPalette.white,
  123. borderRadius: 4,
  124. borderWidth: 1,
  125. marginVertical: 5,
  126. paddingHorizontal: BoxModel.padding,
  127. paddingVertical: 2 * BoxModel.padding
  128. },
  129. /**
  130. * The style of the top-level container/{@code View} of
  131. * {@code LocalVideoTrackUnderlay}.
  132. */
  133. localVideoTrackUnderlay: {
  134. alignSelf: 'stretch',
  135. backgroundColor: 'transparent',
  136. flex: 1
  137. },
  138. /**
  139. * Top-level screen style.
  140. */
  141. page: {
  142. flex: 1,
  143. flexDirection: 'column'
  144. },
  145. /**
  146. * The styles for reduced UI mode.
  147. */
  148. reducedUIContainer: {
  149. alignItems: 'center',
  150. backgroundColor: ColorPalette.blue,
  151. flex: 1,
  152. justifyContent: 'center'
  153. },
  154. reducedUIText: {
  155. color: TEXT_COLOR,
  156. fontSize: 12
  157. },
  158. /**
  159. * Container for room name input box and 'join' button.
  160. */
  161. roomContainer: {
  162. alignSelf: 'stretch',
  163. flexDirection: 'column'
  164. },
  165. /**
  166. * Container of the side bar.
  167. */
  168. sideBar: {
  169. width: 250,
  170. height: Dimensions.get('window').height
  171. },
  172. /**
  173. * The body of the side bar where the items are.
  174. */
  175. sideBarBody: {
  176. backgroundColor: ColorPalette.white,
  177. flex: 1
  178. },
  179. /**
  180. * The style of the side bar header.
  181. */
  182. sideBarHeader: {
  183. alignItems: 'center',
  184. flexDirection: 'column',
  185. height: SIDEBAR_HEADER_HEIGHT,
  186. justifyContent: 'center',
  187. padding: BoxModel.padding
  188. },
  189. /**
  190. * Style of the menu items in the side bar.
  191. */
  192. sideBarItem: {
  193. padding: 13
  194. },
  195. /**
  196. * The View inside the side bar buttons (icon + text).
  197. */
  198. sideBarItemButtonContainer: {
  199. alignItems: 'center',
  200. flexDirection: 'row',
  201. justifyContent: 'flex-start'
  202. },
  203. /**
  204. * The icon in the side bar item touchables.
  205. */
  206. sideBarItemIcon: {
  207. color: ColorPalette.blueHighlight,
  208. fontSize: 20,
  209. marginRight: 15
  210. },
  211. /**
  212. * The label of the side bar item touchables.
  213. */
  214. sideBarItemText: {
  215. color: ColorPalette.black,
  216. fontWeight: 'bold'
  217. },
  218. /**
  219. * The container of the label of the audio-video switch.
  220. */
  221. switchLabel: {
  222. paddingHorizontal: 3
  223. },
  224. /**
  225. * Room input style.
  226. */
  227. textInput: {
  228. backgroundColor: 'transparent',
  229. borderColor: ColorPalette.white,
  230. borderRadius: 4,
  231. borderWidth: 1,
  232. color: TEXT_COLOR,
  233. fontSize: 23,
  234. height: 50,
  235. padding: 4,
  236. textAlign: 'center'
  237. },
  238. /**
  239. * Application title style.
  240. */
  241. title: {
  242. color: TEXT_COLOR,
  243. fontSize: 25,
  244. marginBottom: 2 * BoxModel.margin,
  245. textAlign: 'center'
  246. },
  247. insecureRoomNameWarningContainer: {
  248. alignItems: 'center',
  249. flexDirection: 'row',
  250. paddingHorizontal: 5
  251. },
  252. insecureRoomNameWarningIcon: {
  253. color: ColorPalette.warning,
  254. fontSize: 24,
  255. marginRight: 10
  256. },
  257. insecureRoomNameWarningText: {
  258. color: ColorPalette.warning,
  259. flex: 1
  260. },
  261. /**
  262. * The style of the top-level container of {@code WelcomePage}.
  263. */
  264. welcomePage: {
  265. backgroundColor: ColorPalette.blue,
  266. overflow: 'hidden'
  267. }
  268. };