test: 测试版 邮件开放账户

dev/emitter
Lei OT 10 months ago
parent 5cd652e1be
commit 7e80dc84eb

@ -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_EMAL} from '@/stores/AuthStore';
/**
* @ignore
@ -42,6 +42,7 @@ const WABASwitcher = ({ onSelect, }) => {
const ReplyWrapper = () => {
const [mobile] = useStyleStore(state => [state.mobile]);
const {userId, whatsAppBusiness} = useAuthStore((state) => state.loginUser);
const [isPermitted] = useAuthStore((state) => [state.isPermitted])
const [activeChannel, setActiveChannel] = useState(DEFAULT_CHANNEL);
const onChannelTabsChange = (activeKey) => {
@ -72,10 +73,10 @@ 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: 'email', label: mobile ? '' : '邮件', icon: <MailOutlined className='text-indigo-500' />, children: isPermitted(PERM_USE_EMAL) ? <EmailComposer currentActive={activeChannel==='email'} /> : <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: '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> },
// TODO WA
// TODO: WA
];
return (

Loading…
Cancel
Save