Commit 0d702202 by archer

fix: file selector

parent 36bd2582
......@@ -202,7 +202,14 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
return (
<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
fileExtension={fileExtension}
onSelectFile={onSelectFile}
......@@ -212,7 +219,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
{!emptyFiles && (
<>
<Box py={4} maxH={'400px'}>
<Box py={4} px={2} maxH={'400px'} overflow={'auto'}>
{files.map((item) => (
<Flex
key={item.id}
......@@ -314,7 +321,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
</Flex>
</>
)}
</Box>
</Flex>
{!emptyFiles && (
<Box flex={'2 0 0'} w={['100%', 0]} h={'100%'}>
{previewFile ? (
......@@ -373,7 +380,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
{files.map((file) =>
file.chunks.map((item, i) => (
<Box
key={item}
key={i}
py={4}
bg={'myWhite.500'}
my={2}
......
......@@ -133,7 +133,14 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
return (
<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
fileExtension={fileExtension}
onSelectFile={onSelectFile}
......@@ -147,7 +154,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
{!emptyFiles && (
<>
<Box py={4} maxH={'400px'}>
<Box py={4} px={2} maxH={'400px'} overflow={'auto'}>
{files.map((item) => (
<Flex
key={item.id}
......@@ -193,7 +200,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
</Flex>
</>
)}
</Box>
</Flex>
{!emptyFiles && (
<Box flex={'2 0 0'} w={['100%', 0]} h={'100%'} pt={[4, 8]} overflow={'overlay'}>
<Box px={[4, 8]} fontSize={['lg', 'xl']} fontWeight={'bold'}>
......
......@@ -193,7 +193,14 @@ const QAImport = ({ kbId }: { kbId: string }) => {
return (
<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
fileExtension={fileExtension}
onSelectFile={onSelectFile}
......@@ -203,7 +210,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
{!emptyFiles && (
<>
<Box py={4} maxH={'400px'}>
<Box py={4} px={2} maxH={'400px'} overflow={'auto'}>
{files.map((item) => (
<Flex
key={item.id}
......@@ -295,7 +302,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
</Flex>
</>
)}
</Box>
</Flex>
{!emptyFiles && (
<Box flex={'2 0 0'} w={['100%', 0]} h={'100%'}>
{previewFile ? (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment