mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-21 03:35:36 +00:00
feat: Update the system configuration type, add visibility controls for datasets and publishing channels (#4778)
This commit is contained in:
@@ -64,6 +64,12 @@ export type FastGPTFeConfigsType = {
|
||||
show_coupon?: boolean;
|
||||
concatMd?: string;
|
||||
|
||||
show_dataset_feishu?: boolean;
|
||||
show_dataset_yuque?: boolean;
|
||||
show_publish_feishu?: boolean;
|
||||
show_publish_dingtalk?: boolean;
|
||||
show_publish_offiaccount?: boolean;
|
||||
|
||||
concatMd?: string;
|
||||
docUrl?: string;
|
||||
openAPIDocUrl?: string;
|
||||
|
@@ -42,20 +42,28 @@ const OutLink = () => {
|
||||
value: PublishChannelEnum.apikey,
|
||||
isProFn: false
|
||||
},
|
||||
{
|
||||
icon: 'core/app/publish/lark',
|
||||
title: t('publish:feishu_bot'),
|
||||
desc: t('publish:feishu_bot_desc'),
|
||||
value: PublishChannelEnum.feishu,
|
||||
isProFn: true
|
||||
},
|
||||
{
|
||||
icon: 'common/dingtalkFill',
|
||||
title: t('publish:dingtalk.bot'),
|
||||
desc: t('publish:dingtalk.bot_desc'),
|
||||
value: PublishChannelEnum.dingtalk,
|
||||
isProFn: true
|
||||
},
|
||||
...(feConfigs?.show_publish_feishu !== false
|
||||
? [
|
||||
{
|
||||
icon: 'core/app/publish/lark',
|
||||
title: t('publish:feishu_bot'),
|
||||
desc: t('publish:feishu_bot_desc'),
|
||||
value: PublishChannelEnum.feishu,
|
||||
isProFn: true
|
||||
}
|
||||
]
|
||||
: []),
|
||||
...(feConfigs?.show_publish_dingtalk !== false
|
||||
? [
|
||||
{
|
||||
icon: 'common/dingtalkFill',
|
||||
title: t('publish:dingtalk.bot'),
|
||||
desc: t('publish:dingtalk.bot_desc'),
|
||||
value: PublishChannelEnum.dingtalk,
|
||||
isProFn: true
|
||||
}
|
||||
]
|
||||
: []),
|
||||
// {
|
||||
// icon: 'core/app/publish/wecom',
|
||||
// title: t('publish:wecom.bot'),
|
||||
@@ -63,13 +71,17 @@ const OutLink = () => {
|
||||
// value: PublishChannelEnum.wecom,
|
||||
// isProFn: true
|
||||
// },
|
||||
{
|
||||
icon: 'core/app/publish/offiaccount',
|
||||
title: t('publish:official_account.name'),
|
||||
desc: t('publish:official_account.desc'),
|
||||
value: PublishChannelEnum.officialAccount,
|
||||
isProFn: true
|
||||
}
|
||||
...(feConfigs?.show_publish_offiaccount !== false
|
||||
? [
|
||||
{
|
||||
icon: 'core/app/publish/offiaccount',
|
||||
title: t('publish:official_account.name'),
|
||||
desc: t('publish:official_account.desc'),
|
||||
value: PublishChannelEnum.officialAccount,
|
||||
isProFn: true
|
||||
}
|
||||
]
|
||||
: [])
|
||||
]);
|
||||
|
||||
const [linkType, setLinkType] = useState<PublishChannelEnum>(PublishChannelEnum.share);
|
||||
|
@@ -177,18 +177,26 @@ const Dataset = () => {
|
||||
description: t('dataset:external_file_dataset_desc'),
|
||||
onClick: () => onSelectDatasetType(DatasetTypeEnum.apiDataset)
|
||||
},
|
||||
{
|
||||
icon: 'core/dataset/feishuDatasetColor',
|
||||
label: t('dataset:feishu_dataset'),
|
||||
description: t('dataset:feishu_dataset_desc'),
|
||||
onClick: () => onSelectDatasetType(DatasetTypeEnum.feishu)
|
||||
},
|
||||
{
|
||||
icon: 'core/dataset/yuqueDatasetColor',
|
||||
label: t('dataset:yuque_dataset'),
|
||||
description: t('dataset:yuque_dataset_desc'),
|
||||
onClick: () => onSelectDatasetType(DatasetTypeEnum.yuque)
|
||||
}
|
||||
...(feConfigs?.show_dataset_feishu !== false
|
||||
? [
|
||||
{
|
||||
icon: 'core/dataset/feishuDatasetColor',
|
||||
label: t('dataset:feishu_dataset'),
|
||||
description: t('dataset:feishu_dataset_desc'),
|
||||
onClick: () => onSelectDatasetType(DatasetTypeEnum.feishu)
|
||||
}
|
||||
]
|
||||
: []),
|
||||
...(feConfigs?.show_dataset_yuque !== false
|
||||
? [
|
||||
{
|
||||
icon: 'core/dataset/yuqueDatasetColor',
|
||||
label: t('dataset:yuque_dataset'),
|
||||
description: t('dataset:yuque_dataset_desc'),
|
||||
onClick: () => onSelectDatasetType(DatasetTypeEnum.yuque)
|
||||
}
|
||||
]
|
||||
: [])
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user