mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-30 23:26:36 +08:00
fix: hide drop-zone upload button when picked an image (#12088)
### What problem does this PR solve? Hide drop-zone upload button when picked an image in chunk editor dialog ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -175,18 +175,18 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
||||
<FormItem>
|
||||
<FormLabel className="gap-1">{t('chunk.image')}</FormLabel>
|
||||
|
||||
<div className="grid grid-cols-2 gap-4 items-start">
|
||||
<div className="space-y-4">
|
||||
{data?.data?.img_id && (
|
||||
<Image
|
||||
id={data?.data?.img_id}
|
||||
className="w-full object-contain"
|
||||
className="mx-auto w-auto max-w-full object-contain max-h-[800px]"
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className="col-start-2 col-end-3 only:col-span-2">
|
||||
<FormControl>
|
||||
<FileUploader
|
||||
className="h-48"
|
||||
className="h-auto p-6"
|
||||
value={field.value}
|
||||
onValueChange={field.onChange}
|
||||
accept={{
|
||||
@ -195,6 +195,7 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
|
||||
'image/webp': [],
|
||||
}}
|
||||
maxFileCount={1}
|
||||
hideDropzoneOnMaxFileCount
|
||||
title={t('chunk.imageUploaderTitle')}
|
||||
description={<></>}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user