mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-19 05:05:53 +08:00
chore: file type checkbox
This commit is contained in:
parent
cfbabb8383
commit
9851153d38
@ -6,6 +6,7 @@ import { SupportUploadFileTypes } from '../../../types'
|
||||
import cn from '@/utils/classnames'
|
||||
import { FILE_EXTS } from '@/app/components/base/prompt-editor/constants'
|
||||
import TagInput from '@/app/components/base/tag-input'
|
||||
import Checkbox from '@/app/components/base/checkbox'
|
||||
|
||||
type Props = {
|
||||
type: SupportUploadFileTypes.image | SupportUploadFileTypes.document | SupportUploadFileTypes.audio | SupportUploadFileTypes.video | SupportUploadFileTypes.custom
|
||||
@ -45,7 +46,8 @@ const FileTypeItem: FC<Props> = ({
|
||||
<div>
|
||||
<div className='flex items-center p-3 pb-2 border-b border-divider-subtle'>
|
||||
<span className='shrink-0 w-4 h-4 bg-[#00B2EA]'></span>
|
||||
<div className='ml-2 text-text-primary system-sm-medium'>{t(`appDebug.variableConig.file.${type}.name`)}</div>
|
||||
<div className='mx-2 grow text-text-primary system-sm-medium'>{t(`appDebug.variableConig.file.${type}.name`)}</div>
|
||||
<Checkbox className='shrink-0' checked={selected} />
|
||||
</div>
|
||||
<div className='p-3' onClick={e => e.stopPropagation()}>
|
||||
<TagInput
|
||||
@ -60,10 +62,11 @@ const FileTypeItem: FC<Props> = ({
|
||||
<div className='flex items-center'>
|
||||
{/* TODO: Wait File type icon */}
|
||||
<span className='shrink-0 w-4 h-4 bg-[#00B2EA]'></span>
|
||||
<div className='ml-2'>
|
||||
<div className='mx-2 grow'>
|
||||
<div className='text-text-primary system-sm-medium'>{t(`appDebug.variableConig.file.${type}.name`)}</div>
|
||||
<div className='mt-1 text-text-tertiary system-2xs-regular-uppercase'>{type !== SupportUploadFileTypes.custom ? FILE_EXTS[type].join(', ') : t('appDebug.variableConig.file.custom.description')}</div>
|
||||
</div>
|
||||
<Checkbox className='shrink-0' checked={selected} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user