mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
support type fitlering for app template
This commit is contained in:
@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next'
|
||||
import cn from 'classnames'
|
||||
import exploreI18n from '@/i18n/en-US/explore'
|
||||
import type { AppCategory } from '@/models/explore'
|
||||
import { ThumbsUp } from '@/app/components/base/icons/src/vender/line/alertsAndFeedback'
|
||||
|
||||
const categoryI18n = exploreI18n.category
|
||||
|
||||
@ -30,7 +31,7 @@ const Category: FC<ICategoryProps> = ({
|
||||
const isAllCategories = !list.includes(value)
|
||||
|
||||
const itemClassName = (isSelected: boolean) => cn(
|
||||
'px-3 py-[5px] h-[28px] rounded-lg border-[0.5px] border-transparent text-gray-700 font-medium leading-[18px] cursor-pointer hover:bg-gray-200',
|
||||
'flex items-center px-3 py-[7px] h-[32px] rounded-lg border-[0.5px] border-transparent text-gray-700 font-medium leading-[18px] cursor-pointer hover:bg-gray-200',
|
||||
isSelected && 'bg-white border-gray-200 shadow-xs text-primary-600 hover:bg-white',
|
||||
)
|
||||
|
||||
@ -40,6 +41,7 @@ const Category: FC<ICategoryProps> = ({
|
||||
className={itemClassName(isAllCategories)}
|
||||
onClick={() => onChange(allCategoriesEn)}
|
||||
>
|
||||
<ThumbsUp className='mr-1 w-3.5 h-3.5'/>
|
||||
{t('explore.apps.allCategories')}
|
||||
</div>
|
||||
{list.map(name => (
|
||||
|
||||
Reference in New Issue
Block a user