perf: add friendly tip for add non-message feature bot

pull/220/head
moonrailgun 1 year ago
parent d88b307770
commit 53a05cb6bd

@ -107,7 +107,7 @@ const IntegrationPanel: React.FC = React.memo(() => {
</Row>
<div className="action">
{openAppInfo.capability.includes('bot') && (
{openAppInfo.capability.includes('bot') ? (
<Button
type="primary"
size="small"
@ -116,6 +116,10 @@ const IntegrationPanel: React.FC = React.memo(() => {
>
{Translate.addBot}
</Button>
) : (
<Button type="primary" size="small" disabled={true}>
{Translate.cannotAddBot}
</Button>
)}
</div>
</div>

@ -29,4 +29,8 @@ export const Translate = {
'zh-CN': '添加应用机器人到群组',
'en-US': 'Add app bot to group',
}),
cannotAddBot: localTrans({
'zh-CN': '该应用机器人没有开放聊天功能',
'en-US': 'This application does not enable chat feature',
}),
};

Loading…
Cancel
Save