@messenger-box/platform-browser 10.0.3-alpha.56 → 10.0.3-alpha.62
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 +8 -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 +5 -5
- 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,10 +1,5 @@
|
|
|
1
1
|
import React, { createElement, useState } from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom';
|
|
3
2
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import 'antd/dist/antd.css';
|
|
5
|
-
// import './index.css';
|
|
6
|
-
import { Tooltip, Avatar } from 'antd';
|
|
7
|
-
import { Comment } from '@ant-design/compatible';
|
|
8
3
|
import Moment from 'moment';
|
|
9
4
|
import { AiFillLike } from '@react-icons/all-files/ai/AiFillLike';
|
|
10
5
|
import { AiOutlineLike } from '@react-icons/all-files/ai/AiOutlineLike';
|
|
@@ -14,7 +9,7 @@ import { AiFillDislike } from '@react-icons/all-files/ai/AiFillDislike';
|
|
|
14
9
|
export const MessageBox = () => {
|
|
15
10
|
const [likes, setLikes] = useState(0);
|
|
16
11
|
const [dislikes, setDislikes] = useState(0);
|
|
17
|
-
const [action, setAction] = useState(null);
|
|
12
|
+
const [action, setAction] = useState<string | null>(null);
|
|
18
13
|
const { t } = useTranslation();
|
|
19
14
|
|
|
20
15
|
const like = () => {
|
|
@@ -30,37 +25,53 @@ export const MessageBox = () => {
|
|
|
30
25
|
};
|
|
31
26
|
|
|
32
27
|
const actions = [
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</
|
|
44
|
-
</
|
|
45
|
-
<
|
|
28
|
+
<div key="comment-basic-like" className="group relative inline-block">
|
|
29
|
+
<button
|
|
30
|
+
onClick={like}
|
|
31
|
+
className="flex items-center space-x-1 text-gray-500 hover:text-blue-500 transition-colors"
|
|
32
|
+
>
|
|
33
|
+
<span className="text-lg">{createElement(action === 'liked' ? AiFillLike : AiOutlineLike)}</span>
|
|
34
|
+
<span className="text-sm">{likes}</span>
|
|
35
|
+
</button>
|
|
36
|
+
<div className="invisible group-hover:visible absolute -top-8 left-1/2 -translate-x-1/2 px-2 py-1 bg-gray-800 text-white text-xs rounded whitespace-nowrap">
|
|
37
|
+
Like
|
|
38
|
+
</div>
|
|
39
|
+
</div>,
|
|
40
|
+
<div key="comment-basic-dislike" className="group relative inline-block ml-4">
|
|
41
|
+
<button
|
|
42
|
+
onClick={dislike}
|
|
43
|
+
className="flex items-center space-x-1 text-gray-500 hover:text-red-500 transition-colors"
|
|
44
|
+
>
|
|
45
|
+
<span className="text-lg">
|
|
46
|
+
{createElement(action === 'disliked' ? AiFillDislike : AiOutlineDislike)}
|
|
47
|
+
</span>
|
|
48
|
+
<span className="text-sm">{dislikes}</span>
|
|
49
|
+
</button>
|
|
50
|
+
<div className="invisible group-hover:visible absolute -top-8 left-1/2 -translate-x-1/2 px-2 py-1 bg-gray-800 text-white text-xs rounded whitespace-nowrap">
|
|
51
|
+
Dislike
|
|
52
|
+
</div>
|
|
53
|
+
</div>,
|
|
54
|
+
<button
|
|
55
|
+
key="comment-basic-reply-to"
|
|
56
|
+
className="ml-4 text-sm text-gray-500 hover:text-gray-700 transition-colors"
|
|
57
|
+
>
|
|
58
|
+
{t('messenger_box_browser.reply_to')}
|
|
59
|
+
</button>,
|
|
46
60
|
];
|
|
47
61
|
|
|
48
62
|
return (
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
{/*<span>{Moment().fromNow()}</span>*/}
|
|
58
|
-
<span>{Moment().format('HH:mm:ss')}</span>
|
|
63
|
+
<div className="flex space-x-4 p-4">
|
|
64
|
+
<div className="flex-shrink-0">
|
|
65
|
+
<img className="h-10 w-10 rounded-full" src="https://via.placeholder.com/40" alt="User avatar" />
|
|
66
|
+
</div>
|
|
67
|
+
<div className="flex-grow">
|
|
68
|
+
<div className="flex items-center space-x-2">
|
|
69
|
+
<span className="font-medium text-gray-900">User Name</span>
|
|
70
|
+
<span className="text-sm text-gray-500">{Moment().fromNow()}</span>
|
|
59
71
|
</div>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
72
|
+
<div className="mt-1 text-gray-700">Message content goes here</div>
|
|
73
|
+
<div className="mt-2 flex items-center space-x-2">{actions}</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
63
76
|
);
|
|
64
77
|
};
|
|
65
|
-
|
|
66
|
-
// ReactDOM.render(<Demo />, document.getElementById('container'));
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { styleSheet } from './style';
|
|
4
|
-
import { css } from '@emotion/css';
|
|
5
3
|
|
|
6
4
|
type IProps = {
|
|
7
5
|
handleShowSideBar?: any;
|
|
@@ -46,28 +44,36 @@ const MoreAction = ({
|
|
|
46
44
|
{
|
|
47
45
|
title: t('messenger_box_browser.edit'),
|
|
48
46
|
Link: handleEditMessage,
|
|
49
|
-
className: '
|
|
47
|
+
className: 'text-blue-600 hover:text-blue-700',
|
|
50
48
|
},
|
|
51
49
|
{
|
|
52
50
|
title: t('messenger_box_browser.delete'),
|
|
53
51
|
Link: handleDeleteMessage,
|
|
54
|
-
className: '
|
|
52
|
+
className: 'text-red-600 hover:text-red-700',
|
|
55
53
|
},
|
|
56
54
|
];
|
|
57
55
|
return (
|
|
58
|
-
<div className=
|
|
59
|
-
<ul>
|
|
56
|
+
<div className="bg-white rounded-lg shadow-lg py-2 min-w-[200px]">
|
|
57
|
+
<ul className="divide-y divide-gray-100">
|
|
60
58
|
{cardData.map((element: any, index: number) => {
|
|
61
59
|
return (
|
|
62
|
-
<li
|
|
63
|
-
|
|
60
|
+
<li
|
|
61
|
+
key={index}
|
|
62
|
+
onClick={() => element.Link(id)}
|
|
63
|
+
className="px-4 py-2 hover:bg-gray-50 cursor-pointer"
|
|
64
|
+
>
|
|
65
|
+
<a className="block text-gray-700 text-sm">{element.tiltle}</a>
|
|
64
66
|
</li>
|
|
65
67
|
);
|
|
66
68
|
})}
|
|
67
69
|
{moreActionData.map((element: any, index: number) => {
|
|
68
70
|
return (
|
|
69
|
-
<li
|
|
70
|
-
|
|
71
|
+
<li
|
|
72
|
+
key={index}
|
|
73
|
+
className={`px-4 py-2 hover:bg-gray-50 cursor-pointer ${element.className}`}
|
|
74
|
+
onClick={() => element.Link(id)}
|
|
75
|
+
>
|
|
76
|
+
<a className="block text-sm">{element.title}</a>
|
|
71
77
|
</li>
|
|
72
78
|
);
|
|
73
79
|
})}
|
|
@@ -1,27 +1,39 @@
|
|
|
1
1
|
import React, { FC, useState } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { Col, Input } from 'antd';
|
|
4
3
|
import { AiOutlinePaperClip } from '@react-icons/all-files/ai/AiOutlinePaperClip';
|
|
5
4
|
import { AiOutlineSmile } from '@react-icons/all-files/ai/AiOutlineSmile';
|
|
6
|
-
import { css } from '@emotion/css';
|
|
7
5
|
import { IMessageList } from './../types/message';
|
|
8
|
-
import { messagesData } from './../mock';
|
|
9
|
-
import { styleSheet } from './style';
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
interface PostMessageProps {
|
|
8
|
+
handleEnterButton: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
9
|
+
enterValue: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const PostMessage: FC<PostMessageProps> = ({ handleEnterButton, enterValue }) => {
|
|
13
13
|
const { t } = useTranslation();
|
|
14
|
+
|
|
14
15
|
return (
|
|
15
|
-
<div className=
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
<div className="flex items-center p-4 border-t border-gray-200">
|
|
17
|
+
<div className="relative flex-1">
|
|
18
|
+
<input
|
|
19
|
+
type="text"
|
|
20
|
+
value={enterValue}
|
|
21
|
+
onKeyPress={(e) => {
|
|
22
|
+
if (e.key === 'Enter') {
|
|
23
|
+
handleEnterButton(e);
|
|
24
|
+
}
|
|
25
|
+
}}
|
|
26
|
+
placeholder={t('messenger_box_browser.please_enter')}
|
|
27
|
+
className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent"
|
|
28
|
+
/>
|
|
29
|
+
<div className="absolute right-0 top-0 h-full flex items-center pr-3 space-x-2">
|
|
30
|
+
<button className="text-gray-400 hover:text-gray-600">
|
|
31
|
+
<AiOutlinePaperClip className="h-5 w-5" />
|
|
32
|
+
</button>
|
|
33
|
+
<button className="text-gray-400 hover:text-gray-600">
|
|
34
|
+
<AiOutlineSmile className="h-5 w-5" />
|
|
35
|
+
</button>
|
|
36
|
+
</div>
|
|
25
37
|
</div>
|
|
26
38
|
</div>
|
|
27
39
|
);
|
|
@@ -1,201 +1,73 @@
|
|
|
1
1
|
import React, { FC, useState } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { Col, Row, Divider } from 'antd';
|
|
4
|
-
import { Popover, Avatar } from 'antd';
|
|
5
|
-
import { Comment } from '@ant-design/compatible';
|
|
6
3
|
import { useSelector } from 'react-redux';
|
|
7
4
|
import { IoBookmarkOutline } from 'react-icons/io5';
|
|
8
5
|
import { useGetUserAccountQuery } from 'common/graphql';
|
|
9
6
|
import { BiDotsHorizontalRounded, BiPaperPlane, BiEdit } from 'react-icons/bi';
|
|
10
7
|
import { MdOutlineEmojiEmotions } from 'react-icons/md';
|
|
11
8
|
import { FaRobot } from 'react-icons/fa';
|
|
12
|
-
import { css } from '@emotion/css';
|
|
13
9
|
import Moment from 'moment';
|
|
14
10
|
import { IMessageReplyList } from '../types/message';
|
|
15
|
-
import { styleSheet } from '../threadSidebar/style';
|
|
16
11
|
|
|
17
12
|
interface IProps {
|
|
18
13
|
userMessagesList?: IMessageReplyList[];
|
|
19
14
|
}
|
|
20
15
|
|
|
21
|
-
interface SyntheticEvent<T> {
|
|
22
|
-
currentTarget: EventTarget & T;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
16
|
export const SidebarThreadList: FC<IProps> = ({ userMessagesList }) => {
|
|
26
|
-
const userId = useSelector<any>((state) => state.user.authUserId);
|
|
27
|
-
const { data: { getUserAccount } = {} } = useGetUserAccountQuery({
|
|
28
|
-
//@ts-ignore
|
|
29
|
-
variables: { userId },
|
|
30
|
-
skip: !userId,
|
|
31
|
-
});
|
|
32
|
-
const [showHoverModal, setShowHoverModal] = useState<boolean>(false);
|
|
33
17
|
const { t } = useTranslation();
|
|
34
|
-
|
|
18
|
+
const [showEmoji, setShowEmoji] = useState(false);
|
|
35
19
|
|
|
36
20
|
return (
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
21
|
+
<div className="flex flex-col h-full bg-white">
|
|
22
|
+
<div className="flex items-center justify-between p-4 border-b border-gray-200">
|
|
23
|
+
<h2 className="text-lg font-semibold text-gray-900">{t('messenger_box_browser.thread')}</h2>
|
|
24
|
+
<button className="text-gray-400 hover:text-gray-600">
|
|
25
|
+
<BiDotsHorizontalRounded className="h-5 w-5" />
|
|
26
|
+
</button>
|
|
27
|
+
</div>
|
|
28
|
+
<div className="flex-1 overflow-y-auto">
|
|
29
|
+
{userMessagesList?.map((thread, index) => (
|
|
30
|
+
<div key={index} className="p-4 border-b border-gray-200">
|
|
31
|
+
<div className="flex items-start space-x-3">
|
|
32
|
+
<div className="flex-shrink-0">
|
|
33
|
+
<img
|
|
34
|
+
src={thread.user?.avatar || 'https://via.placeholder.com/40'}
|
|
35
|
+
alt={thread.user?.name || 'User'}
|
|
36
|
+
className="h-10 w-10 rounded-full"
|
|
37
|
+
/>
|
|
54
38
|
</div>
|
|
55
|
-
<
|
|
56
|
-
className="
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<div
|
|
65
|
-
style={{
|
|
66
|
-
display: 'flex',
|
|
67
|
-
flexDirection: 'column',
|
|
68
|
-
// alignItems: 'center',
|
|
69
|
-
}}
|
|
70
|
-
>
|
|
71
|
-
<Avatar
|
|
72
|
-
size={{ xxl: 100 }}
|
|
73
|
-
style={{
|
|
74
|
-
backgroundColor: 'black',
|
|
75
|
-
marginBottom: '15px',
|
|
76
|
-
marginLeft: '25px',
|
|
77
|
-
alignItems: 'center',
|
|
78
|
-
}}
|
|
79
|
-
>
|
|
80
|
-
<FaRobot
|
|
81
|
-
style={{ marginTop: '22px' }}
|
|
82
|
-
fontSize="50px"
|
|
83
|
-
fill="white"
|
|
84
|
-
/>
|
|
85
|
-
</Avatar>
|
|
86
|
-
<p style={{ fontWeight: 'bold' }}>
|
|
87
|
-
{t('messenger_box_browser.surveybot')}
|
|
88
|
-
</p>
|
|
89
|
-
<p>{t('messenger_box_browser.survey_bot_collects_your')}</p>
|
|
90
|
-
<div>
|
|
91
|
-
<h5>
|
|
92
|
-
{t('messenger_box_browser.local_time')}{' '}
|
|
93
|
-
<span>{Moment().format('HH:mm A')}</span>
|
|
94
|
-
</h5>
|
|
95
|
-
</div>
|
|
96
|
-
<a className="icon-popover">
|
|
97
|
-
<BiPaperPlane style={{ fontSize: '15px', marginRight: '3px' }} />
|
|
98
|
-
{t('messenger_box_browser.send_message')}
|
|
99
|
-
</a>
|
|
100
|
-
</div>
|
|
101
|
-
}
|
|
102
|
-
trigger="click"
|
|
103
|
-
>
|
|
104
|
-
<Avatar style={{ backgroundColor: 'black' }}>
|
|
105
|
-
<FaRobot style={{ marginTop: '4px' }} fontSize="20px" fill="white" />
|
|
106
|
-
</Avatar>
|
|
107
|
-
</Popover>
|
|
108
|
-
}
|
|
109
|
-
content={<p>{items?.message}</p>}
|
|
110
|
-
datetime={
|
|
111
|
-
// <Tooltip title={Moment().format('YYYY-MM-DD HH:mm:ss')}>
|
|
112
|
-
<div>
|
|
113
|
-
{/*<span>{Moment().fromNow()}</span>*/}
|
|
114
|
-
<span>{Moment().format('HH:mm A')}</span>
|
|
39
|
+
<div className="flex-1 min-w-0">
|
|
40
|
+
<div className="flex items-center justify-between">
|
|
41
|
+
<div className="flex items-center space-x-2">
|
|
42
|
+
<span className="text-sm font-medium text-gray-900">
|
|
43
|
+
{thread.user?.name || 'Unknown User'}
|
|
44
|
+
</span>
|
|
45
|
+
<span className="text-xs text-gray-500">
|
|
46
|
+
{Moment(thread.create_at).format('LT')}
|
|
47
|
+
</span>
|
|
115
48
|
</div>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<div className="hover_btns">
|
|
126
|
-
<button>
|
|
127
|
-
<BiDotsHorizontalRounded fontSize="16px" fill="gray" />
|
|
49
|
+
{thread.isBot && <FaRobot className="h-5 w-5 text-gray-400" />}
|
|
50
|
+
</div>
|
|
51
|
+
<p className="mt-1 text-sm text-gray-700">{thread.message}</p>
|
|
52
|
+
<div className="mt-2 flex items-center space-x-4">
|
|
53
|
+
<button
|
|
54
|
+
onClick={() => setShowEmoji(!showEmoji)}
|
|
55
|
+
className="text-gray-400 hover:text-gray-600"
|
|
56
|
+
>
|
|
57
|
+
<MdOutlineEmojiEmotions className="h-5 w-5" />
|
|
128
58
|
</button>
|
|
129
|
-
<button>
|
|
130
|
-
<
|
|
59
|
+
<button className="text-gray-400 hover:text-gray-600">
|
|
60
|
+
<BiEdit className="h-5 w-5" />
|
|
131
61
|
</button>
|
|
132
|
-
<button>
|
|
133
|
-
<IoBookmarkOutline
|
|
62
|
+
<button className="text-gray-400 hover:text-gray-600">
|
|
63
|
+
<IoBookmarkOutline className="h-5 w-5" />
|
|
134
64
|
</button>
|
|
135
65
|
</div>
|
|
136
66
|
</div>
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
title={<a>{'@' + getUserAccount.username}</a>}
|
|
143
|
-
content={
|
|
144
|
-
<div
|
|
145
|
-
style={{
|
|
146
|
-
display: 'flex',
|
|
147
|
-
flexDirection: 'column',
|
|
148
|
-
alignItems: 'center',
|
|
149
|
-
}}
|
|
150
|
-
>
|
|
151
|
-
<Avatar
|
|
152
|
-
size={{ xxl: 100 }}
|
|
153
|
-
style={{
|
|
154
|
-
backgroundColor: 'blue',
|
|
155
|
-
textTransform: 'uppercase',
|
|
156
|
-
fontSize: '50px',
|
|
157
|
-
marginBottom: '15px',
|
|
158
|
-
}}
|
|
159
|
-
>
|
|
160
|
-
{getUserAccount?.username.substring(0, 1)}
|
|
161
|
-
</Avatar>
|
|
162
|
-
<a>{getUserAccount?.email}</a>
|
|
163
|
-
<div>
|
|
164
|
-
<h5>
|
|
165
|
-
{t('messenger_box_browser.local_time')}{' '}
|
|
166
|
-
<span>{Moment().format('HH:mm A')}</span>
|
|
167
|
-
</h5>
|
|
168
|
-
</div>
|
|
169
|
-
<a
|
|
170
|
-
className="icon-popover"
|
|
171
|
-
style={{ display: 'flex', justifyContent: 'c' }}
|
|
172
|
-
>
|
|
173
|
-
<BiEdit style={{ fontSize: '15px', marginRight: '3px' }} />
|
|
174
|
-
{t('messenger_box_browser.edit_account_setting')}
|
|
175
|
-
</a>
|
|
176
|
-
</div>
|
|
177
|
-
}
|
|
178
|
-
trigger="click"
|
|
179
|
-
>
|
|
180
|
-
<Avatar style={{ backgroundColor: 'blue', textTransform: 'uppercase' }}>
|
|
181
|
-
{getUserAccount.username.substring(0, 1)}
|
|
182
|
-
</Avatar>
|
|
183
|
-
</Popover>
|
|
184
|
-
}
|
|
185
|
-
content={<p>{items?.message}</p>}
|
|
186
|
-
datetime={
|
|
187
|
-
// <Tooltip title={Moment().format('YYYY-MM-DD HH:mm:ss')}>
|
|
188
|
-
<div>
|
|
189
|
-
{/*<span>{Moment().fromNow()}</span>*/}
|
|
190
|
-
<span>{Moment().format('HH:mm A')}</span>
|
|
191
|
-
</div>
|
|
192
|
-
/*</Tooltip>*/
|
|
193
|
-
}
|
|
194
|
-
/>
|
|
195
|
-
</Col>
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
})}
|
|
199
|
-
</Row>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
))}
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
200
72
|
);
|
|
201
73
|
};
|