@messenger-box/platform-browser 10.0.3-alpha.56 → 10.0.3-alpha.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/lib/components/InboxMessage/InboxDetails/index.d.ts +6 -1
- package/lib/components/InboxMessage/InboxDetails/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/InboxDetails/index.js +10 -11
- package/lib/components/InboxMessage/InboxDetails/index.js.map +1 -1
- package/lib/components/InboxMessage/InboxSidebar/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/InboxSidebar/index.js +23 -32
- package/lib/components/InboxMessage/InboxSidebar/index.js.map +1 -1
- package/lib/components/InboxMessage/Messages/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/Messages/index.js +42 -81
- package/lib/components/InboxMessage/Messages/index.js.map +1 -1
- package/lib/components/InboxMessage/MessagesList/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/MessagesList/index.js +53 -74
- package/lib/components/InboxMessage/MessagesList/index.js.map +1 -1
- package/lib/components/InboxMessage/Popover/index.d.ts +5 -1
- package/lib/components/InboxMessage/Popover/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/Popover/index.js +8 -35
- package/lib/components/InboxMessage/Popover/index.js.map +1 -1
- package/lib/components/InboxMessage/UserModalContent/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/UserModalContent/index.js +50 -47
- package/lib/components/InboxMessage/UserModalContent/index.js.map +1 -1
- package/lib/components/InboxMessage/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/index.js +38 -70
- package/lib/components/InboxMessage/index.js.map +1 -1
- package/lib/components/dashboard/menu_header.d.ts.map +1 -1
- package/lib/components/dashboard/menu_header.js +38 -24
- package/lib/components/dashboard/menu_header.js.map +1 -1
- package/lib/components/dashboard/modals/direct_modal.d.ts +10 -8
- package/lib/components/dashboard/modals/direct_modal.d.ts.map +1 -1
- package/lib/components/dashboard/modals/direct_modal.js +59 -39
- package/lib/components/dashboard/modals/direct_modal.js.map +1 -1
- package/lib/components/dashboard/modals.d.ts +18 -6
- package/lib/components/dashboard/modals.d.ts.map +1 -1
- package/lib/components/dashboard/modals.js +60 -101
- package/lib/components/dashboard/modals.js.map +1 -1
- package/lib/components/messenger/avatar/index.d.ts.map +1 -1
- package/lib/components/messenger/index.d.ts.map +1 -1
- package/lib/components/messenger/index.js +45 -82
- package/lib/components/messenger/index.js.map +1 -1
- package/lib/components/messenger/messagesList/index.d.ts.map +1 -1
- package/lib/components/messenger/messagesList/index.js +173 -453
- package/lib/components/messenger/messagesList/index.js.map +1 -1
- package/lib/components/messenger/messagesList/messageBox.d.ts +0 -1
- package/lib/components/messenger/messagesList/messageBox.d.ts.map +1 -1
- package/lib/components/messenger/more_action/index.d.ts.map +1 -1
- package/lib/components/messenger/postMessage/postMessage.d.ts +7 -2
- package/lib/components/messenger/postMessage/postMessage.d.ts.map +1 -1
- package/lib/components/messenger/sidebarThreadList/index.d.ts.map +1 -1
- package/lib/components/messenger/threadSidebar/index.d.ts.map +1 -1
- package/lib/components/messenger/types/message.d.ts +11 -11
- package/lib/components/messenger/types/message.d.ts.map +1 -1
- package/lib/components/post/create_post/create_post.d.ts +10 -1
- package/lib/components/post/create_post/create_post.d.ts.map +1 -1
- package/lib/components/post/index.d.ts +5 -3
- package/lib/components/post/index.d.ts.map +1 -1
- package/lib/components/post/index.js +63 -97
- package/lib/components/post/index.js.map +1 -1
- package/lib/components/post/post_header/post_header_custom_status.d.ts.map +1 -1
- package/lib/containers/Dashboard.d.ts.map +1 -1
- package/lib/containers/Dashboard.js +86 -112
- package/lib/containers/Dashboard.js.map +1 -1
- package/lib/containers/DashboardWithLoader.d.ts.map +1 -1
- package/lib/containers/DashboardWithLoader.js +10 -3
- package/lib/containers/DashboardWithLoader.js.map +1 -1
- package/package.json +4 -4
- package/src/components/InboxMessage/InboxDetails/index.tsx +13 -15
- package/src/components/InboxMessage/InboxSidebar/index.tsx +23 -33
- package/src/components/InboxMessage/Messages/index.tsx +54 -93
- package/src/components/InboxMessage/MessagesList/index.tsx +69 -81
- package/src/components/InboxMessage/Popover/index.tsx +14 -38
- package/src/components/InboxMessage/UserModalContent/index.tsx +39 -42
- package/src/components/InboxMessage/index.tsx +50 -65
- package/src/components/dashboard/menu_header.tsx +50 -43
- package/src/components/dashboard/modals/direct_modal.tsx +72 -39
- package/src/components/dashboard/modals.tsx +113 -104
- package/src/components/messenger/avatar/index.tsx +27 -13
- package/src/components/messenger/index.tsx +124 -159
- package/src/components/messenger/messagesList/index.tsx +266 -557
- package/src/components/messenger/messagesList/messageBox.tsx +45 -34
- package/src/components/messenger/more_action/index.tsx +16 -10
- package/src/components/messenger/postMessage/postMessage.tsx +28 -16
- package/src/components/messenger/sidebarThreadList/index.tsx +45 -173
- package/src/components/messenger/threadSidebar/index.tsx +86 -73
- package/src/components/messenger/types/message.ts +12 -11
- package/src/components/post/channel_view/channel_view.tsx +2 -2
- package/src/components/post/create_post/create_post.tsx +103 -195
- package/src/components/post/index.tsx +69 -94
- package/src/components/post/post_header/post_header_custom_status.tsx +7 -6
- package/src/components/post/post_header/style.ts +51 -51
- package/src/containers/Dashboard.tsx +119 -184
- package/src/containers/DashboardWithLoader.tsx +12 -4
- package/lib/components/InboxMessage/InboxDetails/style.d.ts +0 -2
- package/lib/components/InboxMessage/InboxDetails/style.d.ts.map +0 -1
- package/lib/components/InboxMessage/InboxDetails/style.js +0 -27
- package/lib/components/InboxMessage/InboxDetails/style.js.map +0 -1
- package/lib/components/InboxMessage/InboxSidebar/styles.d.ts +0 -2
- package/lib/components/InboxMessage/InboxSidebar/styles.d.ts.map +0 -1
- package/lib/components/InboxMessage/InboxSidebar/styles.js +0 -57
- package/lib/components/InboxMessage/InboxSidebar/styles.js.map +0 -1
- package/lib/components/InboxMessage/Messages/styles.d.ts +0 -81
- package/lib/components/InboxMessage/Messages/styles.d.ts.map +0 -1
- package/lib/components/InboxMessage/Messages/styles.js +0 -85
- package/lib/components/InboxMessage/Messages/styles.js.map +0 -1
- package/lib/components/InboxMessage/Popover/style.d.ts +0 -28
- package/lib/components/InboxMessage/Popover/style.d.ts.map +0 -1
- package/lib/components/InboxMessage/Popover/style.js +0 -27
- package/lib/components/InboxMessage/Popover/style.js.map +0 -1
- package/lib/components/InboxMessage/UserModalContent/style.d.ts +0 -2
- package/lib/components/InboxMessage/UserModalContent/style.d.ts.map +0 -1
- package/lib/components/InboxMessage/UserModalContent/style.js +0 -98
- package/lib/components/InboxMessage/UserModalContent/style.js.map +0 -1
- package/lib/components/InboxMessage/style.js +0 -189
- package/lib/components/InboxMessage/style.js.map +0 -1
- package/lib/components/messenger/avatar/style.d.ts +0 -2
- package/lib/components/messenger/avatar/style.d.ts.map +0 -1
- package/lib/components/messenger/messagesList/style.js +0 -446
- package/lib/components/messenger/messagesList/style.js.map +0 -1
- package/lib/components/messenger/more_action/index.js +0 -48
- package/lib/components/messenger/more_action/index.js.map +0 -1
- package/lib/components/messenger/more_action/style.d.ts +0 -2
- package/lib/components/messenger/more_action/style.d.ts.map +0 -1
- package/lib/components/messenger/more_action/style.js +0 -45
- package/lib/components/messenger/more_action/style.js.map +0 -1
- package/lib/components/post/style.js +0 -20101
- package/lib/components/post/style.js.map +0 -1
- package/lib/style.js +0 -400
- package/lib/style.js.map +0 -1
- package/src/components/InboxMessage/InboxDetails/style.ts +0 -27
- package/src/components/InboxMessage/InboxSidebar/styles.ts +0 -57
- package/src/components/InboxMessage/Messages/styles.ts +0 -85
- package/src/components/InboxMessage/Popover/style.ts +0 -27
- package/src/components/InboxMessage/UserModalContent/style.ts +0 -98
- package/src/components/messenger/avatar/style.ts +0 -86
- package/src/components/messenger/more_action/style.ts +0 -45
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import React, { FC, useState } from 'react';
|
|
2
|
-
import { Avatar, Col, Popover, Row } from 'antd';
|
|
3
|
-
import { Comment } from '@ant-design/compatible';
|
|
4
2
|
import { useSelector } from 'react-redux';
|
|
5
3
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
// import 'antd/dist/antd.css';
|
|
7
4
|
import { BiDotsVerticalRounded, BiPaperPlane, BiDotsHorizontalRounded } from 'react-icons/bi';
|
|
8
5
|
import Moment from 'moment';
|
|
9
|
-
import { css } from '@emotion/css';
|
|
10
|
-
import { styleSheet3 } from './style';
|
|
11
6
|
import { IoBookmarkOutline } from 'react-icons/io5';
|
|
12
7
|
import {
|
|
13
8
|
MdModeEditOutline,
|
|
@@ -26,7 +21,6 @@ import { Picker } from 'emoji-mart';
|
|
|
26
21
|
import { Button, Modal } from 'react-bootstrap';
|
|
27
22
|
import { IPostFragment } from 'common';
|
|
28
23
|
import MoreAction from '../more_action';
|
|
29
|
-
import { styleSheet2 } from '../../post/style';
|
|
30
24
|
|
|
31
25
|
interface IProps {
|
|
32
26
|
userMessagesList: IPostFragment[];
|
|
@@ -59,6 +53,10 @@ export const MessagesList: FC<IProps> = ({
|
|
|
59
53
|
const [showAddMember, setShowAddMember] = useState(false);
|
|
60
54
|
const [inputValue, setInputValue] = useState({ id: '', msg: '' });
|
|
61
55
|
const { t } = useTranslation();
|
|
56
|
+
const [showEmoji, setShowEmoji] = useState(false);
|
|
57
|
+
const [likes, setLikes] = useState(0);
|
|
58
|
+
const [dislikes, setDislikes] = useState(0);
|
|
59
|
+
const [action, setAction] = useState<string | null>(null);
|
|
62
60
|
|
|
63
61
|
console.log('-------Selected channel for chatting---------', channel);
|
|
64
62
|
console.log('-------All messages for selected channel---------', userMessagesList);
|
|
@@ -124,6 +122,18 @@ export const MessagesList: FC<IProps> = ({
|
|
|
124
122
|
document.getElementById(id).click();
|
|
125
123
|
};
|
|
126
124
|
|
|
125
|
+
const like = () => {
|
|
126
|
+
setLikes(1);
|
|
127
|
+
setDislikes(0);
|
|
128
|
+
setAction('liked');
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const dislike = () => {
|
|
132
|
+
setLikes(0);
|
|
133
|
+
setDislikes(1);
|
|
134
|
+
setAction('disliked');
|
|
135
|
+
};
|
|
136
|
+
|
|
127
137
|
return (
|
|
128
138
|
<div>
|
|
129
139
|
<Modal show={show} onHide={() => handleClose('editMessage')}>
|
|
@@ -138,7 +148,12 @@ export const MessagesList: FC<IProps> = ({
|
|
|
138
148
|
/>
|
|
139
149
|
</Modal.Header>
|
|
140
150
|
<Modal.Body>
|
|
141
|
-
<input
|
|
151
|
+
<input
|
|
152
|
+
type="text"
|
|
153
|
+
value={inputValue.msg}
|
|
154
|
+
onChange={(e) => handleChange(e)}
|
|
155
|
+
className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
156
|
+
/>
|
|
142
157
|
</Modal.Body>
|
|
143
158
|
<Modal.Footer>
|
|
144
159
|
<Button onClick={() => handleClose('editMessage')}>{t('messenger_box_browser.close')}</Button>
|
|
@@ -165,55 +180,42 @@ export const MessagesList: FC<IProps> = ({
|
|
|
165
180
|
<input type="search" onChange={(e) => handleChange(e)} />
|
|
166
181
|
</Modal.Body>
|
|
167
182
|
</Modal>
|
|
168
|
-
<div className=
|
|
183
|
+
<div className="space-y-4">
|
|
169
184
|
{!channel ? (
|
|
170
|
-
<
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
>
|
|
189
|
-
<
|
|
190
|
-
</Avatar>
|
|
191
|
-
<p style={{ fontWeight: 'bold' }}>{t('messenger_box_browser.surveybot')}</p>
|
|
192
|
-
<p>{t('messenger_box_browser.survey_bot_collects_your')}</p>
|
|
193
|
-
<div>
|
|
194
|
-
<h5>
|
|
185
|
+
<div className="relative group">
|
|
186
|
+
<button
|
|
187
|
+
className="flex items-center space-x-2 p-2 rounded-full hover:bg-gray-100"
|
|
188
|
+
onClick={() => {}}
|
|
189
|
+
>
|
|
190
|
+
<div className="w-10 h-10 bg-gray-800 rounded-full flex items-center justify-center">
|
|
191
|
+
<FaRobot className="text-white text-xl" />
|
|
192
|
+
</div>
|
|
193
|
+
</button>
|
|
194
|
+
<div className="hidden group-hover:block absolute left-0 mt-2 w-64 p-4 bg-white rounded-lg shadow-lg">
|
|
195
|
+
<div className="flex flex-col items-center">
|
|
196
|
+
<div className="w-20 h-20 bg-gray-800 rounded-full flex items-center justify-center mb-4">
|
|
197
|
+
<FaRobot className="text-white text-3xl" />
|
|
198
|
+
</div>
|
|
199
|
+
<p className="font-bold">{t('messenger_box_browser.surveybot')}</p>
|
|
200
|
+
<p className="text-sm text-gray-600">
|
|
201
|
+
{t('messenger_box_browser.survey_bot_collects_your')}
|
|
202
|
+
</p>
|
|
203
|
+
<div className="mt-2">
|
|
204
|
+
<h5 className="text-sm">
|
|
195
205
|
{t('messenger_box_browser.local_time')}{' '}
|
|
196
206
|
<span>{Moment().format('HH:mm A')}</span>
|
|
197
207
|
</h5>
|
|
198
208
|
</div>
|
|
199
|
-
<
|
|
200
|
-
<BiPaperPlane
|
|
209
|
+
<button className="mt-4 flex items-center text-blue-600 hover:text-blue-700">
|
|
210
|
+
<BiPaperPlane className="mr-1" />
|
|
201
211
|
{t('messenger_box_browser.send_message')}
|
|
202
|
-
</
|
|
212
|
+
</button>
|
|
203
213
|
</div>
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
>
|
|
207
|
-
<Avatar className="main_avatar">
|
|
208
|
-
<FaRobot className="inner_main_avatar" />
|
|
209
|
-
</Avatar>
|
|
210
|
-
</Popover>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
211
216
|
) : (
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
{channel ? (
|
|
215
|
-
<div>
|
|
216
|
-
<p style={{ fontSize: '20px', fontWeight: 600, color: '#4b4a4e' }}>
|
|
217
|
+
<div className="space-y-4">
|
|
218
|
+
<p className="text-xl font-semibold text-gray-700">
|
|
217
219
|
{t('messenger_box_browser.beginning_of')}
|
|
218
220
|
{channel.type !== 'DIRECT'
|
|
219
221
|
? channel.title
|
|
@@ -223,542 +225,249 @@ export const MessagesList: FC<IProps> = ({
|
|
|
223
225
|
: channel.displayName.split('_')[1].split('-')[1]
|
|
224
226
|
: channel.displayName}
|
|
225
227
|
</p>
|
|
226
|
-
{channel.type !== 'DIRECT' ? (
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
{channel.type !== 'DIRECT' ? null : (
|
|
229
|
+
<h5 className="text-gray-600">
|
|
230
|
+
{t('messenger_box_browser.direct_messages_and_files_shared')}
|
|
231
|
+
</h5>
|
|
230
232
|
)}
|
|
231
|
-
<div className="
|
|
232
|
-
<
|
|
233
|
-
|
|
234
|
-
onClick={() =>
|
|
235
|
-
setShowAddMember(true);
|
|
236
|
-
}}
|
|
233
|
+
<div className="flex space-x-6">
|
|
234
|
+
<button
|
|
235
|
+
className="flex items-center text-gray-600 hover:text-gray-800"
|
|
236
|
+
onClick={() => setShowAddMember(true)}
|
|
237
237
|
>
|
|
238
|
-
<TiUserAdd />
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
238
|
+
<TiUserAdd className="mr-2" />
|
|
239
|
+
<span>{t('messenger_box_browser.invite_others_to_this_channel')}</span>
|
|
240
|
+
</button>
|
|
241
|
+
<button className="flex items-center text-gray-600 hover:text-gray-800">
|
|
242
|
+
<MdModeEditOutline className="mr-2" />
|
|
243
|
+
<span>{t('messenger_box_browser.set_a_header')}</span>
|
|
244
|
+
</button>
|
|
243
245
|
</div>
|
|
244
246
|
</div>
|
|
245
|
-
) : (
|
|
246
|
-
<>
|
|
247
|
-
<div className="text-nav">
|
|
248
|
-
<h5>{t('messenger_box_browser.surveybot')}</h5>
|
|
249
|
-
<span>{t('messenger_box_browser.bot')}</span>
|
|
250
|
-
</div>
|
|
251
|
-
<p className="p_style">{t('messenger_box_browser.this_is_the_start_of_your_direct_message')}</p>
|
|
252
|
-
<p className="p_style">{t('messenger_box_browser.direct_messages_and_files_shared')}</p>
|
|
253
|
-
</>
|
|
254
247
|
)}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
248
|
+
|
|
249
|
+
<div className="space-y-4">
|
|
250
|
+
{userMessagesList?.map((item, index: number) => {
|
|
251
|
+
if (!msgClr.hasOwnProperty(item.author.username)) {
|
|
252
|
+
let temp = msgClr;
|
|
253
|
+
let color = '#';
|
|
254
|
+
for (let i = 0; i < 6; i++) {
|
|
255
|
+
color += Math.floor(Math.random() * 10);
|
|
256
|
+
}
|
|
257
|
+
temp[item.author.username] = color;
|
|
258
|
+
setMsgClr(temp);
|
|
263
259
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
260
|
+
|
|
261
|
+
return (
|
|
262
|
+
<div
|
|
263
|
+
key={index}
|
|
264
|
+
className={`p-4 ${item.isPinned ? 'bg-yellow-50' : 'bg-white'} relative group`}
|
|
265
|
+
>
|
|
266
|
+
{/* Date Separator */}
|
|
267
|
+
{index !== 0 ? (
|
|
268
|
+
Moment(userMessagesList[index].createdAt).format('DD/MM/YYYY') !==
|
|
269
|
+
Moment(userMessagesList[index - 1].createdAt).format('DD/MM/YYYY') ? (
|
|
270
|
+
<div className="flex items-center my-4">
|
|
271
|
+
<div className="flex-1 border-t border-gray-300"></div>
|
|
272
|
+
<span className="px-3 text-sm text-gray-500">
|
|
273
|
+
{Moment(item.createdAt).diff(Moment().format(), 'year') == 0
|
|
274
|
+
? Moment(item.createdAt).diff(Moment().format(), 'day') == 0
|
|
275
|
+
? t('messenger_box_browser.today')
|
|
276
|
+
: Moment(item.createdAt).diff(Moment().format(), 'day') == -1
|
|
277
|
+
? t('messenger_box_browser.yesterday')
|
|
278
|
+
: Moment(item.createdAt).diff(Moment().format(), 'day') >= -6
|
|
279
|
+
? `${Moment(item.createdAt).format('dddd')}`
|
|
280
|
+
: `${Moment(item.createdAt).format('MMMM DD')}`
|
|
281
|
+
: `${Moment(item.createdAt).format('MMMM Do, YYYY')}`}
|
|
282
|
+
</span>
|
|
283
|
+
<div className="flex-1 border-t border-gray-300"></div>
|
|
284
|
+
</div>
|
|
285
|
+
) : null
|
|
289
286
|
) : (
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
<div className="btn-hover">
|
|
324
|
-
<div className="hover_btns">
|
|
325
|
-
<button>
|
|
326
|
-
<BiDotsHorizontalRounded
|
|
327
|
-
fontSize="16px"
|
|
328
|
-
fill="gray"
|
|
329
|
-
onClick={() => setShowMoreAction(!showMoreAction)}
|
|
287
|
+
<div className="flex items-center my-4">
|
|
288
|
+
<div className="flex-1 border-t border-gray-300"></div>
|
|
289
|
+
<span className="px-3 text-sm text-gray-500">
|
|
290
|
+
{Moment(item.createdAt).diff(Moment().format(), 'year') == 0
|
|
291
|
+
? Moment(item.createdAt).diff(Moment().format(), 'day') == 0
|
|
292
|
+
? t('messenger_box_browser.today')
|
|
293
|
+
: Moment(item.createdAt).diff(Moment().format(), 'day') == -1
|
|
294
|
+
? t('messenger_box_browser.yesterday')
|
|
295
|
+
: Moment(item.createdAt).diff(Moment().format(), 'day') >= -6
|
|
296
|
+
? `${Moment(item.createdAt).format('dddd')}`
|
|
297
|
+
: `${Moment(item.createdAt).format('MMMM DD')}`
|
|
298
|
+
: `${Moment(item.createdAt).format('MMMM Do, YYYY')}`}
|
|
299
|
+
</span>
|
|
300
|
+
<div className="flex-1 border-t border-gray-300"></div>
|
|
301
|
+
</div>
|
|
302
|
+
)}
|
|
303
|
+
|
|
304
|
+
{/* Emoji Picker */}
|
|
305
|
+
{displayEmoji && msgIndex === index && (
|
|
306
|
+
<div className="absolute bottom-full mb-2">
|
|
307
|
+
<Picker
|
|
308
|
+
onSelect={handleOnSelect}
|
|
309
|
+
native={true}
|
|
310
|
+
set="apple"
|
|
311
|
+
emoji="point_up"
|
|
312
|
+
title={t('messenger_box_browser.pick_your_emoji')}
|
|
313
|
+
emojiSize={24}
|
|
314
|
+
perLine={6}
|
|
315
|
+
color="#ae65c5"
|
|
316
|
+
sheetSize={16}
|
|
317
|
+
showPreview={true}
|
|
318
|
+
showSkinTones={false}
|
|
319
|
+
notFoundEmoji="sleuth_or_spy"
|
|
330
320
|
/>
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
pinMessage={pinMessage}
|
|
342
|
-
/>
|
|
343
|
-
) : null}
|
|
321
|
+
</div>
|
|
322
|
+
)}
|
|
323
|
+
|
|
324
|
+
{/* Message Actions */}
|
|
325
|
+
<div className="hidden group-hover:flex absolute right-4 top-2 bg-white shadow-lg rounded-md">
|
|
326
|
+
<button
|
|
327
|
+
className="p-2 hover:bg-gray-100 rounded-l-md"
|
|
328
|
+
onClick={() => setShowMoreAction(!showMoreAction)}
|
|
329
|
+
>
|
|
330
|
+
<BiDotsHorizontalRounded className="text-gray-500" />
|
|
344
331
|
</button>
|
|
345
|
-
<button
|
|
346
|
-
|
|
332
|
+
<button
|
|
333
|
+
className="p-2 hover:bg-gray-100"
|
|
334
|
+
onClick={() => emojiClick(index, item.id)}
|
|
335
|
+
>
|
|
336
|
+
<MdOutlineEmojiEmotions className="text-gray-500" />
|
|
347
337
|
</button>
|
|
348
|
-
<button>
|
|
349
|
-
<IoBookmarkOutline
|
|
338
|
+
<button className="p-2 hover:bg-gray-100">
|
|
339
|
+
<IoBookmarkOutline className="text-gray-500" />
|
|
350
340
|
</button>
|
|
351
|
-
<button onClick={handleShowSideBar}>
|
|
352
|
-
<BsReply
|
|
341
|
+
<button className="p-2 hover:bg-gray-100 rounded-r-md" onClick={handleShowSideBar}>
|
|
342
|
+
<BsReply className="text-gray-500" />
|
|
353
343
|
</button>
|
|
354
344
|
</div>
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
author={<a> {t('messenger_box_browser.system')} </a>}
|
|
363
|
-
avatar={
|
|
364
|
-
<Avatar style={{ background: 'gray' }}>
|
|
365
|
-
<MdOutlineDesktopMac
|
|
366
|
-
style={{ marginTop: '4px', width: '24px', height: '25px' }}
|
|
367
|
-
/>
|
|
368
|
-
</Avatar>
|
|
369
|
-
}
|
|
370
|
-
content={
|
|
371
|
-
<>
|
|
372
|
-
<p>
|
|
373
|
-
<a>{item.message.split(' ')[0]}</a>` $
|
|
374
|
-
{item.message.split(' ').splice(1).join(' ')}
|
|
375
|
-
</p>
|
|
376
|
-
</>
|
|
377
|
-
}
|
|
378
|
-
datetime={
|
|
379
|
-
<div>
|
|
380
|
-
<span>{Moment(item.createdAt).format('HH:mm A')}</span>
|
|
381
|
-
</div>
|
|
382
|
-
}
|
|
383
|
-
/>
|
|
384
|
-
) : (
|
|
385
|
-
<Comment
|
|
386
|
-
className="chat-cmt"
|
|
387
|
-
// actions={actions}
|
|
388
|
-
// author={<a>{item.author !== null?item.author.username:'User'}</a>}
|
|
389
|
-
author={<a>{item.author ? item.author.username : 'user'}</a>}
|
|
390
|
-
avatar={
|
|
391
|
-
<Popover
|
|
392
|
-
placement="right"
|
|
393
|
-
title={<a>{'@' + item.author.username}</a>}
|
|
394
|
-
content={
|
|
395
|
-
<div
|
|
396
|
-
style={{
|
|
397
|
-
display: 'flex',
|
|
398
|
-
flexDirection: 'column',
|
|
399
|
-
}}
|
|
400
|
-
>
|
|
401
|
-
<Avatar
|
|
402
|
-
size="large"
|
|
403
|
-
style={{
|
|
404
|
-
backgroundColor: 'red',
|
|
405
|
-
marginBottom: '15px',
|
|
406
|
-
marginLeft: '25px',
|
|
407
|
-
alignItems: 'center',
|
|
408
|
-
}}
|
|
409
|
-
>
|
|
410
|
-
{item.author.username
|
|
411
|
-
.match(/\b(\w)/g)
|
|
412
|
-
.join('')
|
|
413
|
-
.toUpperCase()}
|
|
414
|
-
</Avatar>
|
|
415
|
-
<p style={{ fontWeight: 'bold' }}>{item.author.username}</p>
|
|
416
|
-
{/*<p>Survey bot collects your..</p>*/}
|
|
417
|
-
<div>
|
|
418
|
-
<h5>
|
|
419
|
-
{t('messenger_box_browser.local_time')}
|
|
420
|
-
<span>{Moment(item.createdAt).format('HH:mm A')}</span>
|
|
421
|
-
</h5>
|
|
422
|
-
</div>
|
|
423
|
-
<a className="icon-popover">
|
|
424
|
-
<BiPaperPlane
|
|
425
|
-
style={{ fontSize: '15px', marginRight: '3px' }}
|
|
426
|
-
/>
|
|
427
|
-
{t('messenger_box_browser.send_message')}
|
|
428
|
-
</a>
|
|
429
|
-
</div>
|
|
430
|
-
}
|
|
431
|
-
trigger="click"
|
|
345
|
+
|
|
346
|
+
{/* Message Content */}
|
|
347
|
+
<div className="flex space-x-3">
|
|
348
|
+
<div className="flex-shrink-0">
|
|
349
|
+
<div
|
|
350
|
+
className="w-10 h-10 rounded-full flex items-center justify-center text-white"
|
|
351
|
+
style={{ backgroundColor: msgClr[item.author.username] }}
|
|
432
352
|
>
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
['gif', 'png', 'bmp', 'jpeg', 'jpg'].includes(file.extension)
|
|
448
|
-
) {
|
|
449
|
-
return (
|
|
450
|
-
<div className="msg_img_preview">
|
|
451
|
-
<div className="options_style">
|
|
452
|
-
<MdOutlineCloudDownload
|
|
453
|
-
onClick={() => handleDownload(file.id)}
|
|
454
|
-
/>
|
|
455
|
-
<RiShareForwardLine />
|
|
456
|
-
<BiDotsVerticalRounded />
|
|
457
|
-
</div>
|
|
458
|
-
<img
|
|
459
|
-
src={file.url}
|
|
460
|
-
className="preview_img_style"
|
|
461
|
-
onClick={(e) => handleShowPreview(file, item)}
|
|
462
|
-
></img>
|
|
463
|
-
<a
|
|
464
|
-
href={file.url}
|
|
465
|
-
download={file.name}
|
|
466
|
-
id={file.id}
|
|
467
|
-
style={{ display: 'none' }}
|
|
468
|
-
></a>
|
|
469
|
-
</div>
|
|
470
|
-
);
|
|
471
|
-
}
|
|
472
|
-
})
|
|
473
|
-
: ''}
|
|
474
|
-
{emoji && item.id === id
|
|
475
|
-
? emoji.map((e, index) => {
|
|
476
|
-
return (
|
|
477
|
-
<button
|
|
478
|
-
className="reactionClass"
|
|
479
|
-
onClick={() => {
|
|
480
|
-
removeEmoji(index);
|
|
481
|
-
}}
|
|
482
|
-
>
|
|
483
|
-
{e}
|
|
484
|
-
<span>1</span>
|
|
485
|
-
</button>
|
|
486
|
-
);
|
|
487
|
-
})
|
|
488
|
-
: ''}
|
|
489
|
-
{emoji.length && item.id === id ? (
|
|
490
|
-
<button
|
|
491
|
-
style={{
|
|
492
|
-
border: '0px',
|
|
493
|
-
fontSize: '20px',
|
|
494
|
-
padding: '2px',
|
|
495
|
-
position: 'absolute',
|
|
496
|
-
}}
|
|
497
|
-
>
|
|
498
|
-
<MdOutlineAddReaction fill="gray" />
|
|
499
|
-
</button>
|
|
500
|
-
) : (
|
|
501
|
-
''
|
|
502
|
-
)}
|
|
503
|
-
</>
|
|
504
|
-
}
|
|
505
|
-
datetime={
|
|
506
|
-
// <Tooltip title={Moment().format('YYYY-MM-DD HH:mm:ss')}>
|
|
507
|
-
<div>
|
|
508
|
-
{/*<span>{Moment().fromNow()}</span>*/}
|
|
509
|
-
<span>{Moment(item.createdAt).format('HH:mm A')}</span>
|
|
353
|
+
{item.author.username
|
|
354
|
+
.match(/\b(\w)/g)
|
|
355
|
+
.join('')
|
|
356
|
+
.toUpperCase()}
|
|
357
|
+
</div>
|
|
358
|
+
</div>
|
|
359
|
+
<div className="flex-1 min-w-0">
|
|
360
|
+
<div className="flex items-center space-x-2">
|
|
361
|
+
<span className="font-medium text-gray-900">
|
|
362
|
+
{item.author ? item.author.username : 'user'}
|
|
363
|
+
</span>
|
|
364
|
+
<span className="text-sm text-gray-500">
|
|
365
|
+
{Moment(item.createdAt).format('HH:mm A')}
|
|
366
|
+
</span>
|
|
510
367
|
</div>
|
|
511
|
-
|
|
512
|
-
}
|
|
513
|
-
/>
|
|
514
|
-
)}
|
|
515
|
-
</Col>
|
|
516
|
-
);
|
|
517
|
-
// } else {
|
|
518
|
-
// return (
|
|
519
|
-
// <Col
|
|
520
|
-
// md={24}
|
|
521
|
-
// key={index}
|
|
522
|
-
// className={css(styleSheet3.customStyleDemo as any)}
|
|
523
|
-
// style={item?.isPin ? styles : null}
|
|
524
|
-
// >
|
|
525
|
-
// {displayEmoji && msgIndex === index ?
|
|
526
|
-
// <Picker
|
|
527
|
-
// onSelect={handleOnSelect}
|
|
528
|
-
// native={true}
|
|
529
|
-
// set="apple"
|
|
530
|
-
// emoji="point_up"
|
|
531
|
-
// title="Pick your emoji..."
|
|
532
|
-
// emojiSize={24}
|
|
533
|
-
// perLine={6}
|
|
534
|
-
// color="#ae65c5"
|
|
535
|
-
// sheetSize={16}
|
|
536
|
-
// showPreview={true}
|
|
537
|
-
// showSkinTones={false}
|
|
538
|
-
// notFoundEmoji="sleuth_or_spy"
|
|
539
|
-
// /> : ''
|
|
540
|
-
// }
|
|
541
|
-
// <div className="btn-hover">
|
|
542
|
-
// <div className="hover_btns">
|
|
543
|
-
// <button>
|
|
544
|
-
// <BiDotsHorizontalRounded
|
|
545
|
-
// fontSize="16px"
|
|
546
|
-
// fill="gray"
|
|
547
|
-
// onClick={() => setShowMoreAction(!showMoreAction)}
|
|
548
|
-
// />
|
|
549
|
-
// {showMoreAction ? (
|
|
550
|
-
// <MoreAction
|
|
551
|
-
// handleShowSideBar={handleShowSideBar}
|
|
552
|
-
// handleDeleteMessage={handleDeleteMessage}
|
|
553
|
-
// id={item.id}
|
|
554
|
-
// handlePinBtn={handlePinBtn}
|
|
555
|
-
// pinMessage={pinMessage}
|
|
556
|
-
// />
|
|
557
|
-
// ) : null}
|
|
558
|
-
// </button>
|
|
559
|
-
// <button onClick={() => emojiClick(index)}>
|
|
560
|
-
// <MdOutlineEmojiEmotions fontSize="16px" fill="gray"/>
|
|
561
|
-
// </button>
|
|
562
|
-
// <button>
|
|
563
|
-
// <IoBookmarkOutline fontSize="16px" color="gray"/>
|
|
564
|
-
// </button>
|
|
565
|
-
// <button onClick={handleShowSideBar}>
|
|
566
|
-
// <BsReply fontSize="16px" fill="gray"/>
|
|
567
|
-
// </button>
|
|
568
|
-
// </div>
|
|
569
|
-
// </div>
|
|
570
|
-
// {
|
|
571
|
-
// item.timeIsToday ?
|
|
572
|
-
// !separatorDisplaying ?
|
|
573
|
-
// <>
|
|
574
|
-
// <div className="text-divider">Today</div>
|
|
575
|
-
// {separatorDisplaying = true}
|
|
576
|
-
// </>: '' : ''
|
|
577
|
-
// }
|
|
578
|
-
// <Comment
|
|
579
|
-
// // actions={actions}
|
|
580
|
-
// author={<a>{getUserAccount?.username}</a>}
|
|
581
|
-
// avatar={
|
|
582
|
-
// <Popover
|
|
583
|
-
// placement="right"
|
|
584
|
-
// title={<a>{'@' + getUserAccount.username}</a>}
|
|
585
|
-
// content={
|
|
586
|
-
// <div
|
|
587
|
-
// style={{
|
|
588
|
-
// display: 'flex',
|
|
589
|
-
// flexDirection: 'column',
|
|
590
|
-
// alignItems: 'center',
|
|
591
|
-
// }}
|
|
592
|
-
// >
|
|
593
|
-
// <Avatar
|
|
594
|
-
// size={{xxl: 100}}
|
|
595
|
-
// style={{
|
|
596
|
-
// backgroundColor: 'blue',
|
|
597
|
-
// textTransform: 'uppercase',
|
|
598
|
-
// fontSize: '50px',
|
|
599
|
-
// marginBottom: '15px',
|
|
600
|
-
// }}
|
|
601
|
-
// >
|
|
602
|
-
// {getUserAccount?.username.substring(0, 1)}
|
|
603
|
-
// </Avatar>
|
|
604
|
-
// <a>{getUserAccount?.email}</a>
|
|
605
|
-
// <div>
|
|
606
|
-
// <h5>
|
|
607
|
-
// Local Time <span>{Moment().format('HH:mm A')}</span>
|
|
608
|
-
// </h5>
|
|
609
|
-
// </div>
|
|
610
|
-
// <a
|
|
611
|
-
// className="icon-popover"
|
|
612
|
-
// style={{display: 'flex', justifyContent: 'c'}}
|
|
613
|
-
// >
|
|
614
|
-
// <BiEdit style={{fontSize: '15px', marginRight: '3px'}}/>
|
|
615
|
-
// Edit Account Setting
|
|
616
|
-
// </a>
|
|
617
|
-
// </div>
|
|
618
|
-
// }
|
|
619
|
-
// trigger="click"
|
|
620
|
-
// >
|
|
621
|
-
// <Avatar style={{backgroundColor: 'blue', textTransform: 'uppercase'}}>
|
|
622
|
-
// {getUserAccount?.username.substring(0, 1)}
|
|
623
|
-
// </Avatar>
|
|
624
|
-
// </Popover>
|
|
625
|
-
// }
|
|
626
|
-
// content={<p>{item?.message}</p>}
|
|
627
|
-
// datetime={
|
|
628
|
-
// // <Tooltip title={Moment().format('YYYY-MM-DD HH:mm:ss')}>
|
|
629
|
-
// <div>
|
|
630
|
-
// {/*<span>{Moment().fromNow()}</span>*/}
|
|
631
|
-
// <span>{Moment().format('HH:mm A')} </span>
|
|
632
|
-
// </div>
|
|
633
|
-
// /*</Tooltip>*/
|
|
634
|
-
// }
|
|
635
|
-
// />
|
|
636
|
-
// </Col>
|
|
637
|
-
// );
|
|
638
|
-
// }
|
|
639
|
-
})}
|
|
640
|
-
</Row>
|
|
368
|
+
<p className="mt-1 text-gray-900">{item.message}</p>
|
|
641
369
|
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
370
|
+
{/* Files/Images */}
|
|
371
|
+
{item.files.totalCount > 0 && (
|
|
372
|
+
<div className="mt-2 space-y-2">
|
|
373
|
+
{item.files.data.map((file) => {
|
|
374
|
+
if (['gif', 'png', 'bmp', 'jpeg', 'jpg'].includes(file.extension)) {
|
|
375
|
+
return (
|
|
376
|
+
<div key={file.id} className="relative group">
|
|
377
|
+
<img
|
|
378
|
+
src={file.url}
|
|
379
|
+
alt={file.name}
|
|
380
|
+
className="max-w-md rounded-lg cursor-pointer"
|
|
381
|
+
onClick={() => handleShowPreview(file, item)}
|
|
382
|
+
/>
|
|
383
|
+
<div className="hidden group-hover:flex absolute top-2 right-2 space-x-2">
|
|
384
|
+
<button
|
|
385
|
+
className="p-1 bg-black bg-opacity-50 rounded-full text-white hover:bg-opacity-70"
|
|
386
|
+
onClick={() => handleDownload(file.id)}
|
|
387
|
+
>
|
|
388
|
+
<MdOutlineCloudDownload />
|
|
389
|
+
</button>
|
|
390
|
+
<button className="p-1 bg-black bg-opacity-50 rounded-full text-white hover:bg-opacity-70">
|
|
391
|
+
<RiShareForwardLine />
|
|
392
|
+
</button>
|
|
393
|
+
<button className="p-1 bg-black bg-opacity-50 rounded-full text-white hover:bg-opacity-70">
|
|
394
|
+
<BiDotsVerticalRounded />
|
|
395
|
+
</button>
|
|
396
|
+
</div>
|
|
397
|
+
<a
|
|
398
|
+
href={file.url}
|
|
399
|
+
download={file.name}
|
|
400
|
+
id={file.id}
|
|
401
|
+
className="hidden"
|
|
402
|
+
/>
|
|
403
|
+
</div>
|
|
404
|
+
);
|
|
405
|
+
}
|
|
406
|
+
return null;
|
|
407
|
+
})}
|
|
408
|
+
</div>
|
|
409
|
+
)}
|
|
410
|
+
|
|
411
|
+
{/* Reactions */}
|
|
412
|
+
{emoji && item.id === id && (
|
|
413
|
+
<div className="mt-2 flex flex-wrap gap-2">
|
|
414
|
+
{emoji.map((e, index) => (
|
|
415
|
+
<button
|
|
416
|
+
key={index}
|
|
417
|
+
className="inline-flex items-center px-2 py-1 rounded-full bg-gray-100 hover:bg-gray-200"
|
|
418
|
+
onClick={() => removeEmoji(index)}
|
|
419
|
+
>
|
|
420
|
+
{e}
|
|
421
|
+
<span className="ml-1 text-xs text-gray-600">1</span>
|
|
422
|
+
</button>
|
|
423
|
+
))}
|
|
424
|
+
{emoji.length > 0 && (
|
|
425
|
+
<button className="p-1 text-gray-500 hover:text-gray-700">
|
|
426
|
+
<MdOutlineAddReaction />
|
|
427
|
+
</button>
|
|
428
|
+
)}
|
|
429
|
+
</div>
|
|
430
|
+
)}
|
|
431
|
+
</div>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
);
|
|
435
|
+
})}
|
|
436
|
+
</div>
|
|
437
|
+
</div>
|
|
438
|
+
|
|
439
|
+
{/* Image Preview Modal */}
|
|
440
|
+
<Modal show={showPreview} onHide={() => setShowPreview(false)} className="max-w-4xl mx-auto">
|
|
441
|
+
<div className="bg-gray-900 text-white p-4">
|
|
442
|
+
<div className="flex items-center justify-between">
|
|
443
|
+
<div className="flex items-center space-x-4">
|
|
444
|
+
<div className="w-10 h-10 rounded-full bg-gray-700 flex items-center justify-center">
|
|
651
445
|
{clickedImage.msgDetail?.author.username
|
|
652
446
|
.match(/\b(\w)/g)
|
|
653
447
|
.join('')
|
|
654
448
|
.toUpperCase()}
|
|
655
449
|
</div>
|
|
656
|
-
<div
|
|
657
|
-
<h4>{clickedImage.msgDetail?.author.username}</h4>
|
|
658
|
-
<p>{clickedImage.file?.name}</p>
|
|
450
|
+
<div>
|
|
451
|
+
<h4 className="font-medium">{clickedImage.msgDetail?.author.username}</h4>
|
|
452
|
+
<p className="text-sm text-gray-300">{clickedImage.file?.name}</p>
|
|
659
453
|
</div>
|
|
660
454
|
</div>
|
|
661
|
-
<
|
|
662
|
-
|
|
455
|
+
<button className="text-gray-300 hover:text-white" onClick={() => setShowPreview(false)}>
|
|
456
|
+
<GrClose />
|
|
457
|
+
</button>
|
|
458
|
+
</div>
|
|
663
459
|
</div>
|
|
664
|
-
<div className="
|
|
665
|
-
<
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
460
|
+
<div className="bg-black flex items-center justify-center p-4">
|
|
461
|
+
<img
|
|
462
|
+
src={clickedImage.file?.url}
|
|
463
|
+
alt={clickedImage.file?.name}
|
|
464
|
+
className="max-h-[80vh] object-contain"
|
|
465
|
+
/>
|
|
670
466
|
</div>
|
|
671
|
-
<div className="
|
|
672
|
-
<
|
|
673
|
-
<p>{t('messenger_box_browser.working')}</p>
|
|
674
|
-
</Modal.Footer>
|
|
467
|
+
<div className="bg-gray-900 text-white p-4">
|
|
468
|
+
<p>{t('messenger_box_browser.working')}</p>
|
|
675
469
|
</div>
|
|
676
470
|
</Modal>
|
|
677
471
|
</div>
|
|
678
472
|
);
|
|
679
473
|
};
|
|
680
|
-
|
|
681
|
-
// export const ThreadMessagesList: FC<IProps> = ({ userMessagesList, handleShowSideBar }) => {
|
|
682
|
-
//
|
|
683
|
-
// return <></>;
|
|
684
|
-
// return (
|
|
685
|
-
// <div>
|
|
686
|
-
// <Row className={css(styleSheet3.customStyle as any)}>
|
|
687
|
-
// {userMessagesList?.map((item: IMessageList, index: number) => {
|
|
688
|
-
// if (!item.loginUser) {
|
|
689
|
-
// return (
|
|
690
|
-
// <Col md={24} key={index} className={css(styleSheet3.customStyleDemo as any)}>
|
|
691
|
-
// <div className="btn-hover">
|
|
692
|
-
// <div className="hover_btns">
|
|
693
|
-
// <button>
|
|
694
|
-
// <BiDotsHorizontalRounded fontSize="16px" fill="gray"/>
|
|
695
|
-
// </button>
|
|
696
|
-
// <button>
|
|
697
|
-
// <MdOutlineEmojiEmotions fontSize="16px" fill="gray"/>
|
|
698
|
-
// </button>
|
|
699
|
-
// <button>
|
|
700
|
-
// <IoBookmarkOutline fontSize="16px" color="gray"/>
|
|
701
|
-
// </button>
|
|
702
|
-
// </div>
|
|
703
|
-
// </div>
|
|
704
|
-
// <div className="text-divider">Text h.biu guu divider</div>
|
|
705
|
-
// <Comment
|
|
706
|
-
// className="chat-cmt"
|
|
707
|
-
// // actions={actions}
|
|
708
|
-
// author={<a>Slack Bot</a>}
|
|
709
|
-
// avatar={
|
|
710
|
-
// <Avatar style={{backgroundColor: 'black'}}>
|
|
711
|
-
// <FaRobot style={{marginTop: '4px'}} fontSize="20px" fill="white"/>
|
|
712
|
-
// </Avatar>
|
|
713
|
-
// }
|
|
714
|
-
// content={<p>{item?.message}</p>}
|
|
715
|
-
// datetime={
|
|
716
|
-
// // <Tooltip title={Moment().format('YYYY-MM-DD HH:mm:ss')}>
|
|
717
|
-
// <div>
|
|
718
|
-
// {/*<span>{Moment().fromNow()}</span>*/}
|
|
719
|
-
// <span>{Moment().format('HH:mm A')}</span>
|
|
720
|
-
// </div>
|
|
721
|
-
// /*</Tooltip>*/
|
|
722
|
-
// }
|
|
723
|
-
// ></Comment>
|
|
724
|
-
// </Col>
|
|
725
|
-
// );
|
|
726
|
-
// } else {
|
|
727
|
-
// return (
|
|
728
|
-
// <Col md={24} key={index} className={css(styleSheet3.customStyleDemo as any)}>
|
|
729
|
-
// <div className="btn-hover">
|
|
730
|
-
// <div className="hover_btns">
|
|
731
|
-
// <button>
|
|
732
|
-
// <BiDotsHorizontalRounded fontSize="16px" fill="gray"/>
|
|
733
|
-
// </button>
|
|
734
|
-
// <button>
|
|
735
|
-
// <MdOutlineEmojiEmotions fontSize="16px" fill="gray"/>
|
|
736
|
-
// </button>
|
|
737
|
-
// <button>
|
|
738
|
-
// <IoBookmarkOutline fontSize="16px" color="gray"/>
|
|
739
|
-
// </button>
|
|
740
|
-
// </div>
|
|
741
|
-
// </div>
|
|
742
|
-
// <div className="text-divider">Text h.biu guu divider</div>
|
|
743
|
-
// <Comment
|
|
744
|
-
// // actions={actions}
|
|
745
|
-
// author={<a>Han Solo</a>}
|
|
746
|
-
// avatar={<Avatar style={{backgroundColor: 'blue'}}>HS</Avatar>}
|
|
747
|
-
// content={<p>{item?.message}</p>}
|
|
748
|
-
// datetime={
|
|
749
|
-
// // <Tooltip title={Moment().format('YYYY-MM-DD HH:mm:ss')}>
|
|
750
|
-
// <div>
|
|
751
|
-
// {/*<span>{Moment().fromNow()}</span>*/}
|
|
752
|
-
// <span>{Moment().format('HH:mm A')} </span>
|
|
753
|
-
// </div>
|
|
754
|
-
// /*</Tooltip>*/
|
|
755
|
-
// }
|
|
756
|
-
// ></Comment>
|
|
757
|
-
// </Col>
|
|
758
|
-
// );
|
|
759
|
-
// }
|
|
760
|
-
// })}
|
|
761
|
-
// </Row>
|
|
762
|
-
// </div>
|
|
763
|
-
// );
|
|
764
|
-
// };
|