|
|
@@ -5,6 +5,13 @@ import { useTranslation } from 'react-i18next';
|
|
|
const BotTypeCard = (props) => {
|
|
|
const { t } = useTranslation('admin');
|
|
|
|
|
|
+ const renderSupplementaryBotName = () => {
|
|
|
+ return (
|
|
|
+ <span className="supplementary-bot-name mr-2">
|
|
|
+ {t(`admin:slack_integration.selecting_bot_types.${props.value.supplementaryBotName}`)}
|
|
|
+ </span>
|
|
|
+ );
|
|
|
+ };
|
|
|
const renderRecommendedBadge = () => {
|
|
|
return (
|
|
|
<span className="badge badge-info mr-2">
|
|
|
@@ -13,6 +20,7 @@ const BotTypeCard = (props) => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
+
|
|
|
return (
|
|
|
<div
|
|
|
className={`card admin-bot-card mx-3 rounded border-radius-sm shadow ${props.isActive ? 'border-primary' : ''}`}
|
|
|
@@ -27,12 +35,11 @@ const BotTypeCard = (props) => {
|
|
|
>
|
|
|
<span className="mr-2">
|
|
|
{t(`admin:slack_integration.selecting_bot_types.${props.value.name}`)}
|
|
|
-
|
|
|
- </span>
|
|
|
- <span className="supplementary-bot-name mr-2">
|
|
|
- {t(`admin:slack_integration.selecting_bot_types.${props.value.supplementaryBotName}`)}
|
|
|
</span>
|
|
|
|
|
|
+ {props.value.name === 'custom_bot' ? renderSupplementaryBotName() : ''}
|
|
|
+
|
|
|
+
|
|
|
{props.value.botType === 'official-bot' ? renderRecommendedBadge() : ''}
|
|
|
|
|
|
{/* TODO: add an appropriate links by GW-5614 */}
|