|
|
|
@ -1,21 +1,13 @@
|
|
|
|
|
import React, { useState, useRef, useEffect } from 'react';
|
|
|
|
|
import { App, Input, Flex, Button, Image, } from 'antd';
|
|
|
|
|
import { App, Input, Flex, Button, Image, Tooltip } from 'antd';
|
|
|
|
|
// import { Input } from 'react-chat-elements';
|
|
|
|
|
import useAuthStore from '@/stores/AuthStore';
|
|
|
|
|
import useConversationStore from '@/stores/ConversationStore';
|
|
|
|
|
import {
|
|
|
|
|
SendOutlined,
|
|
|
|
|
MessageOutlined,
|
|
|
|
|
SmileOutlined,
|
|
|
|
|
PictureOutlined,
|
|
|
|
|
CommentOutlined,
|
|
|
|
|
UploadOutlined,
|
|
|
|
|
CloudUploadOutlined,
|
|
|
|
|
FolderAddOutlined,
|
|
|
|
|
FilePdfOutlined,
|
|
|
|
|
CloseCircleOutlined,
|
|
|
|
|
YoutubeOutlined,
|
|
|
|
|
AudioOutlined, PlayCircleOutlined, LoadingOutlined, CheckCircleOutlined, FileOutlined
|
|
|
|
|
LoadingOutlined, FileOutlined,
|
|
|
|
|
DollarOutlined
|
|
|
|
|
} from '@ant-design/icons';
|
|
|
|
|
import { isEmpty, } from '@/utils/commons';
|
|
|
|
|
import { v4 as uuid } from 'uuid';
|
|
|
|
@ -25,9 +17,9 @@ import InputEmoji from './Emoji';
|
|
|
|
|
import InputMediaUpload from './MediaUpload';
|
|
|
|
|
import { OSS_URL as aliOSSHost } from '@/config';
|
|
|
|
|
import { postUploadFileItem } from '@/actions/CommonActions';
|
|
|
|
|
import ExpireTimeClock from '../ExpireTimeClock';
|
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
import useStyleStore from '@/stores/StyleStore';
|
|
|
|
|
import { useOrderStore } from '@/stores/OrderStore'
|
|
|
|
|
|
|
|
|
|
const ButtonStyleClsMapped =
|
|
|
|
|
{
|
|
|
|
@ -39,6 +31,8 @@ const InputComposer = ({ isWABA, channel }) => {
|
|
|
|
|
const [mobile] = useStyleStore((state) => [state.mobile]);
|
|
|
|
|
|
|
|
|
|
const userId = useAuthStore((state) => state.loginUser.userId);
|
|
|
|
|
const [openPaymentDrawer] = useOrderStore((state) => [state.openDrawer])
|
|
|
|
|
|
|
|
|
|
const websocket = useConversationStore((state) => state.websocket);
|
|
|
|
|
const websocketOpened = useConversationStore((state) => state.websocketOpened);
|
|
|
|
|
const currentConversation = useConversationStore((state) => state.currentConversation);
|
|
|
|
@ -304,6 +298,11 @@ const InputComposer = ({ isWABA, channel }) => {
|
|
|
|
|
{channel==='waba' && <InputTemplate key='templates' disabled={!talkabled} invokeSendMessage={invokeSendMessage} />}
|
|
|
|
|
<InputEmoji key='emoji' disabled={!textabled} inputEmoji={addEmoji} />
|
|
|
|
|
<InputMediaUpload key={'addNewMedia'} disabled={!textabled} {...{ invokeUploadFileMessage, invokeSendUploadMessage }} />
|
|
|
|
|
|
|
|
|
|
<Tooltip title={<><div>支付链接</div></>} >
|
|
|
|
|
<Button type='text' onClick={() => openPaymentDrawer()} icon={<DollarOutlined className='text-orange-500' />} size={'middle'} />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
|
|
|
|
|
{/* <Button type='text' className='' icon={<YoutubeOutlined />} size={'middle'} />
|
|
|
|
|
<Button type='text' className='' icon={<AudioOutlined />} size={'middle'} />
|
|
|
|
|
<Button type='text' className='' icon={<FolderAddOutlined />} size={'middle'} />
|
|
|
|
|