From 4028f46083775bbaed2139b44a66577bdd735b48 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Wed, 12 Jul 2023 14:10:44 +0800 Subject: [PATCH] feat: add clear button for group background image --- client/shared/i18n/langs/en-US/translation.json | 1 + client/shared/i18n/langs/zh-CN/translation.json | 1 + .../src/components/modals/GroupDetail/Config.tsx | 14 +++++++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/client/shared/i18n/langs/en-US/translation.json b/client/shared/i18n/langs/en-US/translation.json index 7807d1ba..304e6298 100644 --- a/client/shared/i18n/langs/en-US/translation.json +++ b/client/shared/i18n/langs/en-US/translation.json @@ -120,6 +120,7 @@ "k5bb71ad7": "Installed", "k5be1a5b0": "Delete role group", "k5bec387": "Unable to get group information", + "k5ce4e16d": "Clear", "k5d2a6631": "Allow to manage channels", "k5f91e72c": "Built Plugins", "k5fc9ccb6": "Operation too frequently", diff --git a/client/shared/i18n/langs/zh-CN/translation.json b/client/shared/i18n/langs/zh-CN/translation.json index 0b7e3446..4c731b47 100644 --- a/client/shared/i18n/langs/zh-CN/translation.json +++ b/client/shared/i18n/langs/zh-CN/translation.json @@ -120,6 +120,7 @@ "k5bb71ad7": "已安装", "k5be1a5b0": "删除身份组", "k5bec387": "无法获取到群组信息", + "k5ce4e16d": "清除", "k5d2a6631": "允许管理频道", "k5f91e72c": "内置插件", "k5fc9ccb6": "操作过于频繁", diff --git a/client/web/src/components/modals/GroupDetail/Config.tsx b/client/web/src/components/modals/GroupDetail/Config.tsx index 9d61d5dc..fe657dad 100644 --- a/client/web/src/components/modals/GroupDetail/Config.tsx +++ b/client/web/src/components/modals/GroupDetail/Config.tsx @@ -11,7 +11,7 @@ import { Image } from 'tailchat-design'; import { Loading } from '@/components/Loading'; import { FullModalField } from '@/components/FullModal/Field'; import { FullModalCommonTitle } from '@/components/FullModal/CommonTitle'; -import { Switch } from 'antd'; +import { Button, Switch } from 'antd'; import { pluginGroupConfigItems } from '@/plugin/common'; import { ensurePluginNamePrefix } from '@/utils/plugin-helper'; import { ImageUploader } from '@/components/ImageUploader'; @@ -74,6 +74,18 @@ export const GroupConfig: React.FC<{
{t('建议比例: 16:9 | 建议大小: 1280x720')}
+ + {config['groupBackgroundImage'] && ( + + )} } />