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

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