Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.12 KB | None | 0 0
  1. /* eslint-disable */
  2. import React from 'react';
  3. import PropTypes from 'prop-types';
  4. import {Panel, Placeholder, PanelHeader, Link, Footer, Separator, Div, Textarea, Tabs, TabsItem, HorizontalScroll, HeaderButton, platform, IOS, PromoBanner, FixedLayout, Cell, Button, List, Avatar, Group} from '@vkontakte/vkui';
  5. import Icon28ChevronBack from '@vkontakte/icons/dist/28/chevron_back';
  6. import Icon24Back from '@vkontakte/icons/dist/24/back';
  7. import Icon56RecentOutline from '@vkontakte/icons/dist/56/recent_outline';
  8. import Icon24Send from '@vkontakte/icons/dist/24/send';
  9. const promoBannerProps = {
  10. title: 'Заголовок',
  11. domain: 'vk.com',
  12. ctaText: 'Перейти',
  13. advertisingLabel: 'Реклама',
  14. iconLink: 'https://sun9-7.userapi.com/c846420/v846420985/1526c3/ISX7VF8NjZk.jpg',
  15. description: 'Описание рекламы',
  16. ageRestriction: 14
  17. };
  18. const osname = platform();
  19. function openTab(url) {
  20. // Create link in memory
  21. let a = window.document.createElement("a");
  22. a.target = '_blank';
  23. a.href = url;
  24.  
  25. // Dispatch fake click
  26. let e = window.document.createEvent("MouseEvents");
  27. e.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  28. a.dispatchEvent(e);
  29. };
  30.  
  31. const Chat = ({ dark, light, chat_photo1, chat_photo2, chat_photo3, chat_photo4, chat_photo5, chat_photo6, chat_photo7, chat_photo8, chat_photo9, chat_photo10, chat_message1, chat_message2, chat_message3, chat_message4, chat_message5, chat_message6, chat_message7, chat_message8, chat_message9, chat_message10, chat_d1, chat_d2, chat_d3, chat_d4, chat_d5, chat_d6, chat_d7, chat_d8, chat_d9, chat_d10, chat_un1, chat_un2, chat_un3, chat_un4, chat_un5, chat_un6, chat_un7, chat_un8, chat_un9, chat_un10, chat_u1, chat_u2, chat_u3, chat_u4, chat_u5, chat_u6, chat_u7, chat_u8, chat_u9, chat_u10, calcChat, stageTimer, handleChatChange, go }) => (
  32. <Panel id="chat">
  33. <PanelHeader
  34. left={<HeaderButton onClick={() => window.history.back()} >
  35. {osname === IOS ? <Icon28ChevronBack/> : <Icon24Back/>}
  36. </HeaderButton>}
  37. >
  38. Чат
  39. </PanelHeader>
  40.  
  41. <Cell
  42. multiline
  43. size="l"
  44. indicator={<small>{chat_d10} </small>}
  45. before={<Avatar src={chat_photo10} size={40}></Avatar>}
  46. >
  47. <b>{chat_un10}</b>
  48. <br/ >
  49. <small>{chat_message10} </small>
  50. </Cell>
  51. <Cell multiline
  52. size="l"
  53. indicator={<small>{chat_d9} </small>}
  54. before={<Avatar src={chat_photo9} size={40}></Avatar>}
  55. >
  56. <b> {chat_un9} </b>
  57. <br/ >
  58. <small>{chat_message9} </small>
  59. </Cell>
  60. <Cell multiline
  61. size="l"
  62. indicator={<small>{chat_d8} </small>}
  63. before={<Avatar src={chat_photo8} size={40}></Avatar>}
  64. >
  65. <b> {chat_un8} </b>
  66. <br/ >
  67. <small> {chat_message8}</small>
  68. </Cell>
  69. <Cell multiline
  70. size="l"
  71. indicator={<small>{chat_d7} </small>}
  72. before={<Avatar src={chat_photo7} size={40}></Avatar>}
  73. >
  74. <b> {chat_un7} </b>
  75. <br/ >
  76. <small>{chat_message7} </small>
  77. </Cell>
  78. <Cell multiline
  79. size="l"
  80. indicator={<small>{chat_d6} </small>}
  81. before={<Avatar src={chat_photo6} size={40}></Avatar>}
  82. >
  83. <b>{chat_un6}</b>
  84. <br/ >
  85. <small>{chat_message6}</small>
  86. </Cell>
  87. <Cell multiline
  88. size="l"
  89. indicator={<small>{chat_d5} </small>}
  90. before={<Avatar src={chat_photo5} size={40}></Avatar>}
  91. >
  92. <b>{chat_un5}</b>
  93. <br/ >
  94. <small> {chat_message5} </small>
  95. </Cell>
  96. <Cell multiline
  97. size="l"
  98. indicator={<small>{chat_d4} </small>}
  99. before={<Avatar src={chat_photo4} size={40}></Avatar>}
  100. >
  101. <b> {chat_un4} </b>
  102. <br/ >
  103. < small>{chat_message4}</small>
  104. </Cell>
  105. <Cell multiline
  106. size="l"
  107. indicator={<small>{chat_d3} </small>}
  108. before={<Avatar src={chat_photo3} size={40}></Avatar>}
  109. >
  110. <b>{chat_un3}</b>
  111. <br/ >
  112. <small> {chat_message3}</small>
  113. </Cell>
  114. <Cell multiline
  115. size="l"
  116. indicator={<small>{chat_d2} </small>}
  117. before={<Avatar src={chat_photo2} size={40}></Avatar>}
  118. >
  119. <b> {chat_un2}</b>
  120. <br/ >
  121. <small> {chat_message2} </small>
  122. </Cell>
  123. <Cell multiline
  124. size="l"
  125. indicator={<small>{chat_d1} </small>}
  126. before={<Avatar src={chat_photo1} size={40}></Avatar>}
  127. >
  128. <b>{chat_un1}</b>
  129. <br/ >
  130. < small>{chat_message1} </small>
  131. </Cell>
  132. <FixedLayout vertical="bottom">
  133. <Group style={{ margin: 0, paddingBottom: 20 }}>
  134. <Cell
  135. asideContent={
  136. <Button
  137. level="secondary"
  138. >
  139. <Icon24Send />
  140. </Button>
  141.  
  142. }
  143. >
  144. <Textarea
  145. alignment="center"
  146. placeholder="Введите Ваше сообщение..."
  147. />
  148. </Cell>
  149. </Group>
  150. </FixedLayout>
  151. </Panel>
  152. );
  153. Chat.propTypes = {
  154. id: PropTypes.string.isRequired,
  155. go: PropTypes.func.isRequired,
  156. };
  157.  
  158. export default Chat;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement