Fix a bug in 'assistant-setting.tsx' that causes the upload button to… (#796)

… incorrectly appear on the model settings page.

### What problem does this PR solve?

This is an issue with the Upload component on the assistant-setting
page. I use the show variable to explicitly control the button component
within it.

see:

![20240516000417](https://github.com/infiniflow/ragflow/assets/37476944/de88f911-6dbd-412d-a981-86cf60aa2257)


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] Other (please describe): Add the local models that DeepDoc depends
on to the gitignore file in dev mode.

Signed-off-by: liuchao <lcjia_you@126.com>
This commit is contained in:
lcjia_you 2024-05-16 10:49:41 +08:00 committed by GitHub
parent 7b144cc086
commit 63ca15c595
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 6 deletions

1
.gitignore vendored
View File

@ -29,3 +29,4 @@ Cargo.lock
docker/ragflow-logs/ docker/ragflow-logs/
/flask_session /flask_session
/logs /logs
rag/res/deepdoc

View File

@ -22,6 +22,15 @@ const AssistantSetting = ({ show }: ISegmentedContentProps) => {
return e?.fileList; return e?.fileList;
}; };
const uploadButtion = (
<button style={{ border: 0, background: 'none' }} type="button">
<PlusOutlined />
<div style={{ marginTop: 8 }}>
{t('upload', { keyPrefix: 'common' })}
</div>
</button>
)
return ( return (
<section <section
className={classNames({ className={classNames({
@ -46,12 +55,7 @@ const AssistantSetting = ({ show }: ISegmentedContentProps) => {
maxCount={1} maxCount={1}
showUploadList={{ showPreviewIcon: false, showRemoveIcon: false }} showUploadList={{ showPreviewIcon: false, showRemoveIcon: false }}
> >
<button style={{ border: 0, background: 'none' }} type="button"> {show ? uploadButtion : null}
<PlusOutlined />
<div style={{ marginTop: 8 }}>
{t('upload', { keyPrefix: 'common' })}
</div>
</button>
</Upload> </Upload>
</Form.Item> </Form.Item>
<Form.Item <Form.Item