|
|
@ -1,4 +1,15 @@ |
|
|
|
import { Link, Table, Thead, Tr, Th, TableContainer, Text, Tbody, Td } from '@chakra-ui/react'; |
|
|
|
import { |
|
|
|
|
|
|
|
Link, |
|
|
|
|
|
|
|
Table, |
|
|
|
|
|
|
|
Thead, |
|
|
|
|
|
|
|
Tr, |
|
|
|
|
|
|
|
Th, |
|
|
|
|
|
|
|
TableContainer, |
|
|
|
|
|
|
|
Text, |
|
|
|
|
|
|
|
Tbody, |
|
|
|
|
|
|
|
Td, |
|
|
|
|
|
|
|
Stack |
|
|
|
|
|
|
|
} from '@chakra-ui/react'; |
|
|
|
import { FC } from 'react'; |
|
|
|
import { FC } from 'react'; |
|
|
|
import { OpenPGPSignaturesData, ReleaseData } from '../../types'; |
|
|
|
import { OpenPGPSignaturesData, ReleaseData } from '../../types'; |
|
|
|
import { getParsedDate } from '../../utils'; |
|
|
|
import { getParsedDate } from '../../utils'; |
|
|
@ -20,6 +31,7 @@ export const DataTable: FC<Props> = ({ columnHeaders, data }) => { |
|
|
|
css={{ |
|
|
|
css={{ |
|
|
|
'&::-webkit-scrollbar': { |
|
|
|
'&::-webkit-scrollbar': { |
|
|
|
borderTop: '2px solid var(--chakra-colors-primary)', |
|
|
|
borderTop: '2px solid var(--chakra-colors-primary)', |
|
|
|
|
|
|
|
borderBottom: '2px solid var(--chakra-colors-primary)', |
|
|
|
height: 18 |
|
|
|
height: 18 |
|
|
|
}, |
|
|
|
}, |
|
|
|
'&::-webkit-scrollbar-thumb': { |
|
|
|
'&::-webkit-scrollbar-thumb': { |
|
|
@ -30,26 +42,34 @@ export const DataTable: FC<Props> = ({ columnHeaders, data }) => { |
|
|
|
pb={4} |
|
|
|
pb={4} |
|
|
|
> |
|
|
|
> |
|
|
|
<Table variant='unstyled'> |
|
|
|
<Table variant='unstyled'> |
|
|
|
<Thead> |
|
|
|
{data.length > 0 && ( |
|
|
|
<Tr> |
|
|
|
<Thead> |
|
|
|
{columnHeaders.map((columnHeader, idx) => { |
|
|
|
<Tr> |
|
|
|
return ( |
|
|
|
{columnHeaders.map((columnHeader, idx) => { |
|
|
|
<Th key={idx} textTransform='none' minW={'130.5px'} px={4}> |
|
|
|
return ( |
|
|
|
<Text |
|
|
|
<Th key={idx} textTransform='none' minW={'130.5px'} px={4}> |
|
|
|
fontFamily='"JetBrains Mono", monospace' |
|
|
|
<Text |
|
|
|
fontWeight={700} |
|
|
|
fontFamily='"JetBrains Mono", monospace' |
|
|
|
fontSize='md' |
|
|
|
fontWeight={700} |
|
|
|
color='#868b87' //? Use theme color? Or add to theme?
|
|
|
|
fontSize='md' |
|
|
|
> |
|
|
|
color='#868b87' //? Use theme color? Or add to theme?
|
|
|
|
{columnHeader} |
|
|
|
> |
|
|
|
</Text> |
|
|
|
{columnHeader} |
|
|
|
</Th> |
|
|
|
</Text> |
|
|
|
); |
|
|
|
</Th> |
|
|
|
})} |
|
|
|
); |
|
|
|
</Tr> |
|
|
|
})} |
|
|
|
</Thead> |
|
|
|
</Tr> |
|
|
|
|
|
|
|
</Thead> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
|
|
<Tbody> |
|
|
|
<Tbody> |
|
|
|
|
|
|
|
{data.length === 0 && ( |
|
|
|
|
|
|
|
<Stack justifyContent='center' alignItems='center' w='100%' minH={80}> |
|
|
|
|
|
|
|
<Text textStyle='header4'>No builds found</Text> |
|
|
|
|
|
|
|
</Stack> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
|
|
{dataType === 'Releases' && |
|
|
|
{dataType === 'Releases' && |
|
|
|
data.map((r: ReleaseData, idx: number) => { |
|
|
|
data.map((r: ReleaseData, idx: number) => { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|