mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 12:37:20 +08:00
chore: document readonly
This commit is contained in:
parent
a8f5748dee
commit
6f4518ebf7
@ -16,7 +16,7 @@ const ConfigDocument: FC = () => {
|
|||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const file = useFeatures(s => s.features.file)
|
const file = useFeatures(s => s.features.file)
|
||||||
const featuresStore = useFeaturesStore()
|
const featuresStore = useFeaturesStore()
|
||||||
const { isShowDocumentConfig } = useContext(ConfigContext)
|
const { isShowDocumentConfig, readonly } = useContext(ConfigContext)
|
||||||
|
|
||||||
const isDocumentEnabled = file?.allowed_file_types?.includes(SupportUploadFileTypes.document) ?? false
|
const isDocumentEnabled = file?.allowed_file_types?.includes(SupportUploadFileTypes.document) ?? false
|
||||||
|
|
||||||
@ -64,14 +64,16 @@ const ConfigDocument: FC = () => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className='flex shrink-0 items-center'>
|
{!readonly && (
|
||||||
<div className='ml-1 mr-3 h-3.5 w-[1px] bg-divider-subtle'></div>
|
<div className='flex shrink-0 items-center'>
|
||||||
<Switch
|
<div className='ml-1 mr-3 h-3.5 w-[1px] bg-divider-subtle'></div>
|
||||||
defaultValue={isDocumentEnabled}
|
<Switch
|
||||||
onChange={handleChange}
|
defaultValue={isDocumentEnabled}
|
||||||
size='md'
|
onChange={handleChange}
|
||||||
/>
|
size='md'
|
||||||
</div>
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user