Skip to content

Commit

Permalink
perf: add friendly tip for add non-message feature bot
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Feb 23, 2024
1 parent d88b307 commit 53a05cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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>
Expand Down
4 changes: 4 additions & 0 deletions client/web/plugins/com.msgbyte.integration/src/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}),
};

0 comments on commit 53a05cb

Please sign in to comment.