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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. // @flow
  2. import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
  3. import { BoxModel, ColorPalette } from '../../../base/styles';
  4. import BaseTheme from '../../../base/ui/components/BaseTheme.native';
  5. const BUBBLE_RADIUS = 8;
  6. /**
  7. * The styles of the feature chat.
  8. *
  9. * NOTE: Sizes and colors come from the 8x8 guidelines. This is the first
  10. * component to receive this treating, if others happen to have similar, we
  11. * need to extract the brand colors and sizes into a branding feature (planned
  12. * for the future).
  13. */
  14. export default {
  15. /**
  16. * Wrapper View for the avatar.
  17. */
  18. avatarWrapper: {
  19. marginRight: 8,
  20. width: 32
  21. },
  22. chatLink: {
  23. color: ColorPalette.blue
  24. },
  25. /**
  26. * Wrapper for the details together, such as name, message and time.
  27. */
  28. detailsWrapper: {
  29. alignItems: 'flex-start',
  30. flex: 1,
  31. flexDirection: 'column'
  32. },
  33. emptyComponentWrapper: {
  34. alignSelf: 'center',
  35. flex: 1,
  36. padding: BoxModel.padding,
  37. paddingTop: '8%'
  38. },
  39. /**
  40. * A special padding to avoid issues on some devices (such as Android devices with custom suggestions bar).
  41. */
  42. extraBarPadding: {
  43. paddingBottom: 30
  44. },
  45. inputBar: {
  46. alignItems: 'center',
  47. borderTopColor: 'rgb(209, 219, 231)',
  48. borderTopWidth: 1,
  49. flexDirection: 'row',
  50. paddingBottom: '4%',
  51. paddingHorizontal: BaseTheme.spacing[3]
  52. },
  53. inputField: {
  54. color: BaseTheme.palette.text01,
  55. flex: 1,
  56. height: 48
  57. },
  58. messageBubble: {
  59. alignItems: 'center',
  60. borderRadius: BUBBLE_RADIUS,
  61. flexDirection: 'row'
  62. },
  63. /**
  64. * Wrapper View for the entire block.
  65. */
  66. messageWrapper: {
  67. alignItems: 'flex-start',
  68. flex: 1,
  69. flexDirection: 'row',
  70. marginHorizontal: 17,
  71. marginVertical: 4
  72. },
  73. /**
  74. * Style modifier for the {@code detailsWrapper} for own messages.
  75. */
  76. ownMessageDetailsWrapper: {
  77. alignItems: 'flex-end'
  78. },
  79. replyWrapper: {
  80. alignItems: 'center',
  81. flexDirection: 'row'
  82. },
  83. sendButtonIcon: {
  84. color: BaseTheme.palette.icon01,
  85. fontSize: 22
  86. },
  87. /**
  88. * Style modifier for system (error) messages.
  89. */
  90. systemMessageBubble: {
  91. backgroundColor: 'rgb(247, 215, 215)'
  92. },
  93. /**
  94. * Wrapper for the name and the message text.
  95. */
  96. textWrapper: {
  97. alignItems: 'flex-start',
  98. flexDirection: 'column',
  99. padding: 9
  100. },
  101. /**
  102. * Text node for the timestamp.
  103. */
  104. timeText: {
  105. color: 'rgb(164, 184, 209)',
  106. fontSize: 13
  107. },
  108. chatContainer: {
  109. backgroundColor: BaseTheme.palette.ui01,
  110. flex: 1
  111. },
  112. tabContainer: {
  113. flexDirection: 'row',
  114. justifyContent: 'center'
  115. },
  116. tabLeftButton: {
  117. flex: 1,
  118. borderTopLeftRadius: 0,
  119. borderTopRightRadius: 0,
  120. borderBottomLeftRadius: 0
  121. },
  122. tabRightButton: {
  123. flex: 1,
  124. borderTopLeftRadius: 0,
  125. borderTopRightRadius: 0,
  126. borderBottomRightRadius: 0
  127. },
  128. gifContainer: {
  129. maxHeight: 150
  130. },
  131. gifImage: {
  132. resizeMode: 'contain',
  133. width: 250,
  134. height: undefined,
  135. flexGrow: 1
  136. }
  137. };
  138. ColorSchemeRegistry.register('Chat', {
  139. /**
  140. * Background of the chat screen.
  141. */
  142. backdrop: {
  143. backgroundColor: schemeColor('background'),
  144. flex: 1
  145. },
  146. /**
  147. * The text node for the display name.
  148. */
  149. displayName: {
  150. color: schemeColor('displayName'),
  151. fontSize: 13
  152. },
  153. emptyComponentText: {
  154. color: BaseTheme.palette.text03,
  155. textAlign: 'center'
  156. },
  157. lobbyMessageBubble: {
  158. backgroundColor: schemeColor('lobbyMsgBackground')
  159. },
  160. lobbyMsgNotice: {
  161. color: schemeColor('lobbyMsgNotice'),
  162. fontSize: 11,
  163. marginTop: 6
  164. },
  165. lobbyMessageRecipientContainer: {
  166. alignItems: 'center',
  167. backgroundColor: schemeColor('lobbyMsgBackground'),
  168. flexDirection: 'row',
  169. padding: BoxModel.padding
  170. },
  171. localMessageBubble: {
  172. backgroundColor: schemeColor('localMsgBackground'),
  173. borderTopRightRadius: 0
  174. },
  175. messageRecipientCancelIcon: {
  176. color: schemeColor('icon'),
  177. fontSize: 18
  178. },
  179. messageRecipientContainer: {
  180. alignItems: 'center',
  181. backgroundColor: schemeColor('privateMsgBackground'),
  182. flexDirection: 'row',
  183. padding: BoxModel.padding
  184. },
  185. messageRecipientText: {
  186. color: schemeColor('text'),
  187. flex: 1
  188. },
  189. privateNotice: {
  190. color: schemeColor('privateMsgNotice'),
  191. fontSize: 11,
  192. marginTop: 6
  193. },
  194. privateMessageBubble: {
  195. backgroundColor: schemeColor('privateMsgBackground')
  196. },
  197. remoteMessageBubble: {
  198. backgroundColor: schemeColor('remoteMsgBackground'),
  199. borderTopLeftRadius: 0
  200. },
  201. replyContainer: {
  202. alignSelf: 'stretch',
  203. borderLeftColor: schemeColor('replyBorder'),
  204. borderLeftWidth: 1,
  205. justifyContent: 'center'
  206. },
  207. replyStyles: {
  208. iconStyle: {
  209. color: schemeColor('replyIcon'),
  210. fontSize: 22,
  211. padding: 8
  212. }
  213. }
  214. });