mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
Fixed background color of file upload box in Chat configuration (#5132)
* Fixed background color of file upload box in Chat configuration * Refactor FileUpload to use useSelector for customization * lint fix --------- Co-authored-by: Henry Heng <henryheng@flowiseai.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { useDispatch } from 'react-redux'
|
import { useDispatch, useSelector } from 'react-redux'
|
||||||
import { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { enqueueSnackbar as enqueueSnackbarAction, closeSnackbar as closeSnackbarAction, SET_CHATFLOW } from '@/store/actions'
|
import { enqueueSnackbar as enqueueSnackbarAction, closeSnackbar as closeSnackbarAction, SET_CHATFLOW } from '@/store/actions'
|
||||||
@@ -41,6 +41,7 @@ const availableFileTypes = [
|
|||||||
|
|
||||||
const FileUpload = ({ dialogProps }) => {
|
const FileUpload = ({ dialogProps }) => {
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
|
const customization = useSelector((state) => state.customization)
|
||||||
|
|
||||||
useNotifier()
|
useNotifier()
|
||||||
|
|
||||||
@@ -234,14 +235,18 @@ const FileUpload = ({ dialogProps }) => {
|
|||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
borderRadius: 2,
|
borderRadius: 2,
|
||||||
border: '1px solid #e0e0e0',
|
border: customization.isDarkMode ? '1px solid #424242' : '1px solid #e0e0e0',
|
||||||
backgroundColor: '#fafafa',
|
backgroundColor: customization.isDarkMode ? '#2d2d2d' : '#fafafa',
|
||||||
padding: 3,
|
padding: 3,
|
||||||
marginBottom: 3,
|
marginBottom: 3,
|
||||||
marginTop: 2
|
marginTop: 2
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography sx={{ fontSize: 16, fontWeight: 600, marginBottom: 2, color: '#424242' }}>PDF Configuration</Typography>
|
<Typography
|
||||||
|
sx={{ fontSize: 16, fontWeight: 600, marginBottom: 2, color: customization.isDarkMode ? '#ffffff' : '#424242' }}
|
||||||
|
>
|
||||||
|
PDF Configuration
|
||||||
|
</Typography>
|
||||||
|
|
||||||
<Box>
|
<Box>
|
||||||
<Typography sx={{ fontSize: 14, fontWeight: 500, marginBottom: 1 }}>PDF Usage</Typography>
|
<Typography sx={{ fontSize: 14, fontWeight: 500, marginBottom: 1 }}>PDF Usage</Typography>
|
||||||
|
|||||||
Reference in New Issue
Block a user