|
|
|
@ -10,7 +10,7 @@ import useStyleStore from '@/stores/StyleStore';
|
|
|
|
|
import { isEmpty } from '@/utils/commons';
|
|
|
|
|
import { DEFAULT_CHANNEL } from '@/config';
|
|
|
|
|
import { WABAccounts, WABAccountsMapped } from '@/channel/bubbleMsgUtils';
|
|
|
|
|
import useAuthStore from '@/stores/AuthStore';
|
|
|
|
|
import useAuthStore, { PERM_USE_WHATSAPP } from '@/stores/AuthStore';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @ignore
|
|
|
|
@ -72,12 +72,31 @@ const ReplyWrapper = () => {
|
|
|
|
|
|
|
|
|
|
const replyTypes = [
|
|
|
|
|
// { key: 'waba', label: mobile ? '' : (<WABASwitcher />), icon: <WABIcon />, children: <InputComposer channel={'waba'} /> },
|
|
|
|
|
{ key: 'waba', label: mobile ? '' : `商业号(${WABAccountsMapped[whatsAppBusiness]?.verifiedName || '-'})`, icon: <WABIcon />, children: <InputComposer currentActive={activeChannel==='waba'} channel={'waba'} /> },
|
|
|
|
|
{ key: 'email', label: mobile ? '' : '邮件', icon: <MailOutlined className='text-indigo-500' />, children: <EmailComposer currentActive={activeChannel==='email'} />},
|
|
|
|
|
// { key: 'whatsapp', label: mobile ? '' : 'WhatsApp', icon: <WhatsAppOutlined className='text-whatsapp' />, children: <InputComposer channel={'whatsapp'} /> },
|
|
|
|
|
{ key: 'wa', label: mobile ? '' : 'WhatsApp', icon: <WhatsAppOutlined className='text-whatsapp' />, children: <div className='p-2 py-4 text-center text-whatsapp bg-gray-200 rounded rounded-b-none border-gray-300 border-solid border border-b-0 border-x-0'>正在开发……敬请期待</div> },
|
|
|
|
|
{
|
|
|
|
|
key: 'waba',
|
|
|
|
|
label: mobile ? '' : `商业号(${WABAccountsMapped[whatsAppBusiness]?.verifiedName || '-'})`,
|
|
|
|
|
icon: <WABIcon />,
|
|
|
|
|
children: <InputComposer currentActive={activeChannel === 'waba'} channel={'waba'} />,
|
|
|
|
|
},
|
|
|
|
|
{ key: 'email', label: mobile ? '' : '邮件', icon: <MailOutlined className='text-indigo-500' />, children: <EmailComposer currentActive={activeChannel === 'email'} /> },
|
|
|
|
|
{
|
|
|
|
|
key: 'whatsapp',
|
|
|
|
|
label: mobile ? '' : 'WhatsApp',
|
|
|
|
|
icon: <WhatsAppOutlined className='text-whatsapp' />,
|
|
|
|
|
children: isPermitted(PERM_USE_WHATSAPP) ? (
|
|
|
|
|
<InputComposer channel={'whatsapp'} />
|
|
|
|
|
) : (
|
|
|
|
|
<div className='p-2 py-4 text-center text-whatsapp bg-gray-200 rounded rounded-b-none border-gray-300 border-solid border border-b-0 border-x-0'>正在开发……敬请期待</div>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// key: 'wa',
|
|
|
|
|
// label: mobile ? '' : 'WhatsApp',
|
|
|
|
|
// icon: <WhatsAppOutlined className='text-whatsapp' />,
|
|
|
|
|
// children: <div className='p-2 py-4 text-center text-whatsapp bg-gray-200 rounded rounded-b-none border-gray-300 border-solid border border-b-0 border-x-0'>正在开发……敬请期待</div>,
|
|
|
|
|
// },
|
|
|
|
|
// TODO: ⬆️WA未登录,要提示用户到个人页面扫码
|
|
|
|
|
];
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className='reply-wrapper rounded rounded-b-none emoji bg-white'>
|
|
|
|
|