diff --git a/src/views/Conversations/Online/Input/ComposerTools.jsx b/src/views/Conversations/Online/Input/ComposerTools.jsx new file mode 100644 index 0000000..06c1e3c --- /dev/null +++ b/src/views/Conversations/Online/Input/ComposerTools.jsx @@ -0,0 +1,35 @@ +import { createContext, useEffect, useState } from 'react' +import { Flex } from 'antd' +import InputTemplate from './Template' +import InputEmoji from './Emoji' +import InputMediaUpload from './MediaUpload' +import PaymentlinkBtn from './PaymentlinkBtn' +import SnippestBtn from './SnippestBtn' +import useConversationStore from '@/stores/ConversationStore' +import { isEmpty } from '@/utils/commons' + +const ComposerTools = ({ channel, invokeSendUploadMessage, invokeSendMessage, invokeUploadFileMessage, inputEmoji, ...props }) => { + const websocket = useConversationStore((state) => state.websocket) + const websocketOpened = useConversationStore((state) => state.websocketOpened) + const currentConversation = useConversationStore((state) => state.currentConversation) + const talkabled = !isEmpty(currentConversation.sn) && websocketOpened + + return ( + <> + + {['waba'].includes(channel) && } + + + + {['waba', 'wa'].includes(channel) && } + + + + + {/* + + ) +} +export default PaymentlinkBtn diff --git a/src/views/Conversations/Online/Input/SnippestBtn.jsx b/src/views/Conversations/Online/Input/SnippestBtn.jsx new file mode 100644 index 0000000..0aceb2d --- /dev/null +++ b/src/views/Conversations/Online/Input/SnippestBtn.jsx @@ -0,0 +1,17 @@ +import { createContext, useEffect, useState } from 'react' +import useSnippetStore from '@/stores/SnippetStore' + +import { Tooltip, Button } from 'antd' + +const SnippestBtn = ({ ...props }) => { + const [openSnippetDrawer] = useSnippetStore((state) => [state.openDrawer]) + + return ( + + + + ) +} +export default SnippestBtn diff --git a/src/views/Conversations/Online/ReplyWrapper.jsx b/src/views/Conversations/Online/ReplyWrapper.jsx index 2a4049d..e24efcb 100644 --- a/src/views/Conversations/Online/ReplyWrapper.jsx +++ b/src/views/Conversations/Online/ReplyWrapper.jsx @@ -68,8 +68,8 @@ const ReplyWrapper = () => { const replyTypes = [ // { key: 'waba', label: mobile ? '' : (), icon: , children: }, - { key: 'waba', label: mobile ? '' : '商业号', icon: , children: }, - { key: 'email', label: mobile ? '' : '邮件', icon: , children: }, + { key: 'waba', label: mobile ? '' : '商业号', icon: , children: }, + { key: 'email', label: mobile ? '' : '邮件', icon: , children: }, // { key: 'whatsapp', label: mobile ? '' : 'WhatsApp', icon: , children: }, { key: 'wa', label: mobile ? '' : 'WhatsApp', icon: , children:
正在开发……敬请期待
}, // TODO ⬆️WA未登录,要提示用户到个人页面扫码