Fix a bug in 'assistant-setting.tsx' that causes the upload button to… (#796)
Browse files… 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:

### 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 <[email protected]>
.gitignore
CHANGED
@@ -29,3 +29,4 @@ Cargo.lock
|
|
29 |
docker/ragflow-logs/
|
30 |
/flask_session
|
31 |
/logs
|
|
|
|
29 |
docker/ragflow-logs/
|
30 |
/flask_session
|
31 |
/logs
|
32 |
+
rag/res/deepdoc
|
web/src/pages/chat/chat-configuration-modal/assistant-setting.tsx
CHANGED
@@ -22,6 +22,15 @@ const AssistantSetting = ({ show }: ISegmentedContentProps) => {
|
|
22 |
return e?.fileList;
|
23 |
};
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
return (
|
26 |
<section
|
27 |
className={classNames({
|
@@ -46,12 +55,7 @@ const AssistantSetting = ({ show }: ISegmentedContentProps) => {
|
|
46 |
maxCount={1}
|
47 |
showUploadList={{ showPreviewIcon: false, showRemoveIcon: false }}
|
48 |
>
|
49 |
-
|
50 |
-
<PlusOutlined />
|
51 |
-
<div style={{ marginTop: 8 }}>
|
52 |
-
{t('upload', { keyPrefix: 'common' })}
|
53 |
-
</div>
|
54 |
-
</button>
|
55 |
</Upload>
|
56 |
</Form.Item>
|
57 |
<Form.Item
|
|
|
22 |
return e?.fileList;
|
23 |
};
|
24 |
|
25 |
+
const uploadButtion = (
|
26 |
+
<button style={{ border: 0, background: 'none' }} type="button">
|
27 |
+
<PlusOutlined />
|
28 |
+
<div style={{ marginTop: 8 }}>
|
29 |
+
{t('upload', { keyPrefix: 'common' })}
|
30 |
+
</div>
|
31 |
+
</button>
|
32 |
+
)
|
33 |
+
|
34 |
return (
|
35 |
<section
|
36 |
className={classNames({
|
|
|
55 |
maxCount={1}
|
56 |
showUploadList={{ showPreviewIcon: false, showRemoveIcon: false }}
|
57 |
>
|
58 |
+
{show ? uploadButtion : null}
|
|
|
|
|
|
|
|
|
|
|
59 |
</Upload>
|
60 |
</Form.Item>
|
61 |
<Form.Item
|