From bcac67771fcf3e498fb66d2be4ea4d0b9e10a80c Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 23 Dec 2024 16:34:13 +0800 Subject: [PATCH] =?UTF-8?q?conf:=20WhatsApp=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Conversations/Online/ReplyWrapper.jsx | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/views/Conversations/Online/ReplyWrapper.jsx b/src/views/Conversations/Online/ReplyWrapper.jsx index 19f059d..37eebce 100644 --- a/src/views/Conversations/Online/ReplyWrapper.jsx +++ b/src/views/Conversations/Online/ReplyWrapper.jsx @@ -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 ? '' : (), icon: , children: }, - { key: 'waba', label: mobile ? '' : `商业号(${WABAccountsMapped[whatsAppBusiness]?.verifiedName || '-'})`, icon: , children: }, - { key: 'email', label: mobile ? '' : '邮件', icon: , children: }, - // { key: 'whatsapp', label: mobile ? '' : 'WhatsApp', icon: , children: }, - { key: 'wa', label: mobile ? '' : 'WhatsApp', icon: , children:
正在开发……敬请期待
}, + { + key: 'waba', + label: mobile ? '' : `商业号(${WABAccountsMapped[whatsAppBusiness]?.verifiedName || '-'})`, + icon: , + children: , + }, + { key: 'email', label: mobile ? '' : '邮件', icon: , children: }, + { + key: 'whatsapp', + label: mobile ? '' : 'WhatsApp', + icon: , + children: isPermitted(PERM_USE_WHATSAPP) ? ( + + ) : ( +
正在开发……敬请期待
+ ), + }, + // { + // key: 'wa', + // label: mobile ? '' : 'WhatsApp', + // icon: , + // children:
正在开发……敬请期待
, + // }, // TODO: ⬆️WA未登录,要提示用户到个人页面扫码 - ]; + ] return (