mirror of
https://github.com/langgenius/dify.git
synced 2025-07-31 21:36:23 +00:00

Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Novice <novice12185727@gmail.com>
32 lines
1012 B
TypeScript
32 lines
1012 B
TypeScript
'use client'
|
|
import type { FC } from 'react'
|
|
import React from 'react'
|
|
import cn from '@/utils/classnames'
|
|
import { Group } from '@/app/components/base/icons/src/vender/other'
|
|
import { SearchMenu } from '@/app/components/base/icons/src/vender/line/general'
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
type Props = {
|
|
className: string
|
|
noPlugins?: boolean
|
|
}
|
|
|
|
const NoDataPlaceholder: FC<Props> = ({
|
|
className,
|
|
noPlugins,
|
|
}) => {
|
|
const { t } = useTranslation()
|
|
const icon = noPlugins ? (<Group className='size-6 text-text-quaternary' />) : (<SearchMenu className='size-8 text-text-tertiary' />)
|
|
const text = t(`plugin.autoUpdate.noPluginPlaceholder.${noPlugins ? 'noInstalled' : 'noFound'}`)
|
|
return (
|
|
<div className={cn('flex items-center justify-center', className)}>
|
|
<div className='flex flex-col items-center'>
|
|
{icon}
|
|
<div className='system-sm-regular mt-2 text-text-tertiary'>{text}</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default React.memo(NoDataPlaceholder)
|