Browse Source

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:

![2024051600](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>
tags/v0.6.0
lcjia_you 1 year ago
parent
commit
63ca15c595
No account linked to committer's email address
2 changed files with 11 additions and 6 deletions
  1. 1
    0
      .gitignore
  2. 10
    6
      web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx

+ 1
- 0
.gitignore View File

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

+ 10
- 6
web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx View File

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

Loading…
Cancel
Save