mirror of
https://github.com/langgenius/dify.git
synced 2026-04-14 16:08:01 +08:00
feat(publish): enhance success notification for pipeline template publishing with additional information and links
This commit is contained in:
parent
d9cdce3f7a
commit
ad523ef4ad
@ -44,6 +44,7 @@ import classNames from '@/utils/classnames'
|
||||
import PremiumBadge from '@/app/components/base/premium-badge'
|
||||
import { SparklesSoft } from '@/app/components/base/icons/src/public/common'
|
||||
import { useModalContextSelector } from '@/context/modal-context'
|
||||
import Link from 'next/link'
|
||||
|
||||
const PUBLISH_SHORTCUT = ['ctrl', '⇧', 'P']
|
||||
|
||||
@ -150,7 +151,27 @@ const Popup = () => {
|
||||
icon_info: icon,
|
||||
description,
|
||||
})
|
||||
notify({ type: 'success', message: t('common.api.actionSuccess') })
|
||||
notify({
|
||||
type: 'success',
|
||||
message: t('datasetPipeline.publishTemplate.success.message'),
|
||||
children: (
|
||||
<div className='flex flex-col gap-y-1'>
|
||||
<span className='system-xs-regular text-text-secondary'>
|
||||
{t('datasetPipeline.publishTemplate.success.tip')}
|
||||
</span>
|
||||
<Link
|
||||
href='https://docs.dify.ai'
|
||||
target='_blank'
|
||||
className='system-xs-medium-uppercase inline-block text-text-accent'
|
||||
>
|
||||
{t('datasetPipeline.publishTemplate.success.learnMore')}
|
||||
</Link>
|
||||
</div>
|
||||
),
|
||||
})
|
||||
}
|
||||
catch {
|
||||
notify({ type: 'error', message: t('datasetPipeline.publishTemplate.error.message') })
|
||||
}
|
||||
finally {
|
||||
hidePublishingAsCustomizedPipeline()
|
||||
|
||||
@ -39,6 +39,16 @@ const translation = {
|
||||
title: 'Are you sure to delete this pipeline template?',
|
||||
content: 'Deleting the pipeline template is irreversible.',
|
||||
},
|
||||
publishTemplate: {
|
||||
success: {
|
||||
message: 'Pipeline Template Published',
|
||||
tip: 'You can use this template on the creation page.',
|
||||
learnMore: 'Learn more',
|
||||
},
|
||||
error: {
|
||||
message: 'Failed to Publish Pipeline Template',
|
||||
},
|
||||
},
|
||||
exportDSL: {
|
||||
successTip: 'Export pipeline DSL successfully',
|
||||
errorTip: 'Failed to export pipeline DSL',
|
||||
|
||||
@ -39,6 +39,16 @@ const translation = {
|
||||
title: '要删除此知识流水线模板吗?',
|
||||
content: '删除知识流水线模板是不可逆的。',
|
||||
},
|
||||
publishTemplate: {
|
||||
success: {
|
||||
message: '知识流水线模板发布成功',
|
||||
tip: '您可以在创建页使用该模板。',
|
||||
learnMore: '了解更多',
|
||||
},
|
||||
error: {
|
||||
message: '知识流水线模板发布失败',
|
||||
},
|
||||
},
|
||||
exportDSL: {
|
||||
successTip: '成功导出知识流水线 DSL',
|
||||
errorTip: '导出知识流水线 DSL 失败',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user