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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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. paddingHorizontal: BoxModel.padding
  51. },
  52. inputField: {
  53. color: 'rgb(28, 32, 37)',
  54. flex: 1,
  55. height: 48
  56. },
  57. messageBubble: {
  58. alignItems: 'center',
  59. borderRadius: BUBBLE_RADIUS,
  60. flexDirection: 'row'
  61. },
  62. /**
  63. * Wrapper View for the entire block.
  64. */
  65. messageWrapper: {
  66. alignItems: 'flex-start',
  67. flex: 1,
  68. flexDirection: 'row',
  69. marginHorizontal: 17,
  70. marginVertical: 4
  71. },
  72. /**
  73. * Style modifier for the {@code detailsWrapper} for own messages.
  74. */
  75. ownMessageDetailsWrapper: {
  76. alignItems: 'flex-end'
  77. },
  78. replyWrapper: {
  79. alignItems: 'center',
  80. flexDirection: 'row'
  81. },
  82. sendButtonIcon: {
  83. color: ColorPalette.darkGrey,
  84. fontSize: 22
  85. },
  86. /**
  87. * Style modifier for system (error) messages.
  88. */
  89. systemMessageBubble: {
  90. backgroundColor: 'rgb(247, 215, 215)'
  91. },
  92. /**
  93. * Wrapper for the name and the message text.
  94. */
  95. textWrapper: {
  96. alignItems: 'flex-start',
  97. flexDirection: 'column',
  98. padding: 9
  99. },
  100. /**
  101. * Text node for the timestamp.
  102. */
  103. timeText: {
  104. color: 'rgb(164, 184, 209)',
  105. fontSize: 13
  106. },
  107. chatContainer: {
  108. flex: 1
  109. },
  110. tabContainer: {
  111. flexDirection: 'row',
  112. justifyContent: 'center'
  113. },
  114. tabLeftButton: {
  115. flex: 1,
  116. borderTopLeftRadius: 0,
  117. borderTopRightRadius: 0,
  118. borderBottomLeftRadius: 0
  119. },
  120. tabRightButton: {
  121. flex: 1,
  122. borderTopLeftRadius: 0,
  123. borderTopRightRadius: 0,
  124. borderBottomRightRadius: 0
  125. }
  126. };
  127. ColorSchemeRegistry.register('Chat', {
  128. /**
  129. * Background of the chat screen.
  130. */
  131. backdrop: {
  132. backgroundColor: schemeColor('background'),
  133. flex: 1
  134. },
  135. /**
  136. * The text node for the display name.
  137. */
  138. displayName: {
  139. color: schemeColor('displayName'),
  140. fontSize: 13
  141. },
  142. emptyComponentText: {
  143. color: BaseTheme.palette.ui05,
  144. textAlign: 'center'
  145. },
  146. localMessageBubble: {
  147. backgroundColor: schemeColor('localMsgBackground'),
  148. borderTopRightRadius: 0
  149. },
  150. messageRecipientCancelIcon: {
  151. color: schemeColor('icon'),
  152. fontSize: 18
  153. },
  154. messageRecipientContainer: {
  155. alignItems: 'center',
  156. backgroundColor: schemeColor('privateMsgBackground'),
  157. flexDirection: 'row',
  158. padding: BoxModel.padding
  159. },
  160. messageRecipientText: {
  161. color: schemeColor('text'),
  162. flex: 1
  163. },
  164. privateNotice: {
  165. color: schemeColor('privateMsgNotice'),
  166. fontSize: 11,
  167. marginTop: 6
  168. },
  169. privateMessageBubble: {
  170. backgroundColor: schemeColor('privateMsgBackground')
  171. },
  172. remoteMessageBubble: {
  173. backgroundColor: schemeColor('remoteMsgBackground'),
  174. borderTopLeftRadius: 0
  175. },
  176. replyContainer: {
  177. alignSelf: 'stretch',
  178. borderLeftColor: schemeColor('replyBorder'),
  179. borderLeftWidth: 1,
  180. justifyContent: 'center'
  181. },
  182. replyStyles: {
  183. iconStyle: {
  184. color: schemeColor('replyIcon'),
  185. fontSize: 22,
  186. padding: 8
  187. }
  188. }
  189. });