mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 12:45:59 +08:00
Fix/10584 wrong message when no custom tool available in custom tool list (#11851)
This commit is contained in:
parent
5a8a901560
commit
de3911e930
@ -1,13 +1,19 @@
|
|||||||
|
'use client'
|
||||||
|
import { useSearchParams } from 'next/navigation'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
const Empty = () => {
|
const Empty = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
const searchParams = useSearchParams()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex flex-col items-center'>
|
<div className='flex flex-col items-center'>
|
||||||
<div className="shrink-0 w-[163px] h-[149px] bg-cover bg-no-repeat bg-[url('~@/app/components/tools/add-tool-modal/empty.png')]"></div>
|
<div className="shrink-0 w-[163px] h-[149px] bg-cover bg-no-repeat bg-[url('~@/app/components/tools/add-tool-modal/empty.png')]"></div>
|
||||||
<div className='mb-1 text-[13px] font-medium text-text-primary leading-[18px]'>{t('tools.addToolModal.emptyTitle')}</div>
|
<div className='mb-1 text-[13px] font-medium text-text-primary leading-[18px]'>
|
||||||
<div className='text-[13px] text-text-tertiary leading-[18px]'>{t('tools.addToolModal.emptyTip')}</div>
|
{t(`tools.addToolModal.${searchParams.get('category') === 'workflow' ? 'emptyTitle' : 'emptyTitleCustom'}`)}
|
||||||
|
</div>
|
||||||
|
<div className='text-[13px] text-text-tertiary leading-[18px]'>
|
||||||
|
{t(`tools.addToolModal.${searchParams.get('category') === 'workflow' ? 'emptyTip' : 'emptyTipCustom'}`)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,8 @@ const translation = {
|
|||||||
manageInTools: 'Manage in Tools',
|
manageInTools: 'Manage in Tools',
|
||||||
emptyTitle: 'No workflow tool available',
|
emptyTitle: 'No workflow tool available',
|
||||||
emptyTip: 'Go to "Workflow -> Publish as Tool"',
|
emptyTip: 'Go to "Workflow -> Publish as Tool"',
|
||||||
|
emptyTitleCustom: 'No custom tool available',
|
||||||
|
emptyTipCustom: 'Create a custom tool',
|
||||||
},
|
},
|
||||||
createTool: {
|
createTool: {
|
||||||
title: 'Create Custom Tool',
|
title: 'Create Custom Tool',
|
||||||
|
@ -31,6 +31,8 @@ const translation = {
|
|||||||
manageInTools: '去工具列表管理',
|
manageInTools: '去工具列表管理',
|
||||||
emptyTitle: '没有可用的工作流工具',
|
emptyTitle: '没有可用的工作流工具',
|
||||||
emptyTip: '去 “工作流 -> 发布为工具” 添加',
|
emptyTip: '去 “工作流 -> 发布为工具” 添加',
|
||||||
|
emptyTitleCustom: '没有可用的自定义工具',
|
||||||
|
emptyTipCustom: '创建自定义工具',
|
||||||
},
|
},
|
||||||
createTool: {
|
createTool: {
|
||||||
title: '创建自定义工具',
|
title: '创建自定义工具',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user