mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-19 18:14:38 +00:00
fix: file selector
This commit is contained in:
@@ -202,7 +202,14 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box display={['block', 'flex']} h={['auto', '100%']}>
|
<Box display={['block', 'flex']} h={['auto', '100%']}>
|
||||||
<Box flex={1} minW={['auto', '400px']} w={['100%', 0]} p={[4, 8]}>
|
<Flex
|
||||||
|
flexDirection={'column'}
|
||||||
|
flex={'1 0 0'}
|
||||||
|
h={'100%'}
|
||||||
|
minW={['auto', '400px']}
|
||||||
|
w={['100%', 0]}
|
||||||
|
p={[4, 8]}
|
||||||
|
>
|
||||||
<FileSelect
|
<FileSelect
|
||||||
fileExtension={fileExtension}
|
fileExtension={fileExtension}
|
||||||
onSelectFile={onSelectFile}
|
onSelectFile={onSelectFile}
|
||||||
@@ -212,7 +219,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
|
|||||||
|
|
||||||
{!emptyFiles && (
|
{!emptyFiles && (
|
||||||
<>
|
<>
|
||||||
<Box py={4} maxH={'400px'}>
|
<Box py={4} px={2} maxH={'400px'} overflow={'auto'}>
|
||||||
{files.map((item) => (
|
{files.map((item) => (
|
||||||
<Flex
|
<Flex
|
||||||
key={item.id}
|
key={item.id}
|
||||||
@@ -314,7 +321,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
|
|||||||
</Flex>
|
</Flex>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Flex>
|
||||||
{!emptyFiles && (
|
{!emptyFiles && (
|
||||||
<Box flex={'2 0 0'} w={['100%', 0]} h={'100%'}>
|
<Box flex={'2 0 0'} w={['100%', 0]} h={'100%'}>
|
||||||
{previewFile ? (
|
{previewFile ? (
|
||||||
@@ -373,7 +380,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
|
|||||||
{files.map((file) =>
|
{files.map((file) =>
|
||||||
file.chunks.map((item, i) => (
|
file.chunks.map((item, i) => (
|
||||||
<Box
|
<Box
|
||||||
key={item}
|
key={i}
|
||||||
py={4}
|
py={4}
|
||||||
bg={'myWhite.500'}
|
bg={'myWhite.500'}
|
||||||
my={2}
|
my={2}
|
||||||
|
@@ -133,7 +133,14 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box display={['block', 'flex']} h={['auto', '100%']}>
|
<Box display={['block', 'flex']} h={['auto', '100%']}>
|
||||||
<Box flex={1} minW={['auto', '400px']} w={['100%', 0]} p={[4, 8]}>
|
<Flex
|
||||||
|
flexDirection={'column'}
|
||||||
|
flex={'1 0 0'}
|
||||||
|
h={'100%'}
|
||||||
|
minW={['auto', '400px']}
|
||||||
|
w={['100%', 0]}
|
||||||
|
p={[4, 8]}
|
||||||
|
>
|
||||||
<FileSelect
|
<FileSelect
|
||||||
fileExtension={fileExtension}
|
fileExtension={fileExtension}
|
||||||
onSelectFile={onSelectFile}
|
onSelectFile={onSelectFile}
|
||||||
@@ -147,7 +154,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
|
|||||||
|
|
||||||
{!emptyFiles && (
|
{!emptyFiles && (
|
||||||
<>
|
<>
|
||||||
<Box py={4} maxH={'400px'}>
|
<Box py={4} px={2} maxH={'400px'} overflow={'auto'}>
|
||||||
{files.map((item) => (
|
{files.map((item) => (
|
||||||
<Flex
|
<Flex
|
||||||
key={item.id}
|
key={item.id}
|
||||||
@@ -193,7 +200,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
|
|||||||
</Flex>
|
</Flex>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Flex>
|
||||||
{!emptyFiles && (
|
{!emptyFiles && (
|
||||||
<Box flex={'2 0 0'} w={['100%', 0]} h={'100%'} pt={[4, 8]} overflow={'overlay'}>
|
<Box flex={'2 0 0'} w={['100%', 0]} h={'100%'} pt={[4, 8]} overflow={'overlay'}>
|
||||||
<Box px={[4, 8]} fontSize={['lg', 'xl']} fontWeight={'bold'}>
|
<Box px={[4, 8]} fontSize={['lg', 'xl']} fontWeight={'bold'}>
|
||||||
|
@@ -193,7 +193,14 @@ const QAImport = ({ kbId }: { kbId: string }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box display={['block', 'flex']} h={['auto', '100%']}>
|
<Box display={['block', 'flex']} h={['auto', '100%']}>
|
||||||
<Box flex={1} minW={['auto', '400px']} w={['100%', 0]} p={[4, 8]}>
|
<Flex
|
||||||
|
flexDirection={'column'}
|
||||||
|
flex={'1 0 0'}
|
||||||
|
h={'100%'}
|
||||||
|
minW={['auto', '400px']}
|
||||||
|
w={['100%', 0]}
|
||||||
|
p={[4, 8]}
|
||||||
|
>
|
||||||
<FileSelect
|
<FileSelect
|
||||||
fileExtension={fileExtension}
|
fileExtension={fileExtension}
|
||||||
onSelectFile={onSelectFile}
|
onSelectFile={onSelectFile}
|
||||||
@@ -203,7 +210,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
|
|||||||
|
|
||||||
{!emptyFiles && (
|
{!emptyFiles && (
|
||||||
<>
|
<>
|
||||||
<Box py={4} maxH={'400px'}>
|
<Box py={4} px={2} maxH={'400px'} overflow={'auto'}>
|
||||||
{files.map((item) => (
|
{files.map((item) => (
|
||||||
<Flex
|
<Flex
|
||||||
key={item.id}
|
key={item.id}
|
||||||
@@ -295,7 +302,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
|
|||||||
</Flex>
|
</Flex>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Flex>
|
||||||
{!emptyFiles && (
|
{!emptyFiles && (
|
||||||
<Box flex={'2 0 0'} w={['100%', 0]} h={'100%'}>
|
<Box flex={'2 0 0'} w={['100%', 0]} h={'100%'}>
|
||||||
{previewFile ? (
|
{previewFile ? (
|
||||||
|
Reference in New Issue
Block a user