mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-19 01:09:49 +08: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;
|
show_coupon?: boolean;
|
||||||
concatMd?: string;
|
concatMd?: string;
|
||||||
|
|
||||||
|
show_dataset_feishu?: boolean;
|
||||||
|
show_dataset_yuque?: boolean;
|
||||||
|
show_publish_feishu?: boolean;
|
||||||
|
show_publish_dingtalk?: boolean;
|
||||||
|
show_publish_offiaccount?: boolean;
|
||||||
|
|
||||||
concatMd?: string;
|
concatMd?: string;
|
||||||
docUrl?: string;
|
docUrl?: string;
|
||||||
openAPIDocUrl?: string;
|
openAPIDocUrl?: string;
|
||||||
|
|||||||
@@ -42,20 +42,28 @@ const OutLink = () => {
|
|||||||
value: PublishChannelEnum.apikey,
|
value: PublishChannelEnum.apikey,
|
||||||
isProFn: false
|
isProFn: false
|
||||||
},
|
},
|
||||||
{
|
...(feConfigs?.show_publish_feishu !== false
|
||||||
icon: 'core/app/publish/lark',
|
? [
|
||||||
title: t('publish:feishu_bot'),
|
{
|
||||||
desc: t('publish:feishu_bot_desc'),
|
icon: 'core/app/publish/lark',
|
||||||
value: PublishChannelEnum.feishu,
|
title: t('publish:feishu_bot'),
|
||||||
isProFn: true
|
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,
|
...(feConfigs?.show_publish_dingtalk !== false
|
||||||
isProFn: true
|
? [
|
||||||
},
|
{
|
||||||
|
icon: 'common/dingtalkFill',
|
||||||
|
title: t('publish:dingtalk.bot'),
|
||||||
|
desc: t('publish:dingtalk.bot_desc'),
|
||||||
|
value: PublishChannelEnum.dingtalk,
|
||||||
|
isProFn: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
: []),
|
||||||
// {
|
// {
|
||||||
// icon: 'core/app/publish/wecom',
|
// icon: 'core/app/publish/wecom',
|
||||||
// title: t('publish:wecom.bot'),
|
// title: t('publish:wecom.bot'),
|
||||||
@@ -63,13 +71,17 @@ const OutLink = () => {
|
|||||||
// value: PublishChannelEnum.wecom,
|
// value: PublishChannelEnum.wecom,
|
||||||
// isProFn: true
|
// isProFn: true
|
||||||
// },
|
// },
|
||||||
{
|
...(feConfigs?.show_publish_offiaccount !== false
|
||||||
icon: 'core/app/publish/offiaccount',
|
? [
|
||||||
title: t('publish:official_account.name'),
|
{
|
||||||
desc: t('publish:official_account.desc'),
|
icon: 'core/app/publish/offiaccount',
|
||||||
value: PublishChannelEnum.officialAccount,
|
title: t('publish:official_account.name'),
|
||||||
isProFn: true
|
desc: t('publish:official_account.desc'),
|
||||||
}
|
value: PublishChannelEnum.officialAccount,
|
||||||
|
isProFn: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
: [])
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const [linkType, setLinkType] = useState<PublishChannelEnum>(PublishChannelEnum.share);
|
const [linkType, setLinkType] = useState<PublishChannelEnum>(PublishChannelEnum.share);
|
||||||
|
|||||||
@@ -177,18 +177,26 @@ const Dataset = () => {
|
|||||||
description: t('dataset:external_file_dataset_desc'),
|
description: t('dataset:external_file_dataset_desc'),
|
||||||
onClick: () => onSelectDatasetType(DatasetTypeEnum.apiDataset)
|
onClick: () => onSelectDatasetType(DatasetTypeEnum.apiDataset)
|
||||||
},
|
},
|
||||||
{
|
...(feConfigs?.show_dataset_feishu !== false
|
||||||
icon: 'core/dataset/feishuDatasetColor',
|
? [
|
||||||
label: t('dataset:feishu_dataset'),
|
{
|
||||||
description: t('dataset:feishu_dataset_desc'),
|
icon: 'core/dataset/feishuDatasetColor',
|
||||||
onClick: () => onSelectDatasetType(DatasetTypeEnum.feishu)
|
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_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