version/0.6 #4
|
@ -19,12 +19,12 @@ interface IProps {
|
||||||
|
|
||||||
const BookDetailsCard: React.FC<IProps> = (props) => {
|
const BookDetailsCard: React.FC<IProps> = (props) => {
|
||||||
|
|
||||||
const downloadLinkFromIPFS = (gateway: string, book: Book) => {
|
// const downloadLinkFromIPFS = (gateway: string, book: Book) => {
|
||||||
return (
|
// return (
|
||||||
`https://${gateway}/ipfs/${book.ipfs_cid}?filename=` +
|
// `https://${gateway}/ipfs/${book.ipfs_cid}?filename=` +
|
||||||
encodeURIComponent(`${book.title}_${book.author}.${book.extension}`)
|
// encodeURIComponent(`${book.title}_${book.author}.${book.extension}`)
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ const BookDetailsCard: React.FC<IProps> = (props) => {
|
||||||
<Divider />
|
<Divider />
|
||||||
<CardBody>
|
<CardBody>
|
||||||
<SimpleGrid columns={{ sm: 1, md: 3, lg: 4 }} spacing={{ base: 2, md: 4 }}>
|
<SimpleGrid columns={{ sm: 1, md: 3, lg: 4 }} spacing={{ base: 2, md: 4 }}>
|
||||||
<Description name={`${t('book.id') ?? 'zlib/libgen id'}: `}>{id}</Description>
|
{/* <Description name={`${t('book.id') ?? 'zlib/libgen id'}: `}>{id}</Description> */}
|
||||||
<GridItem colSpan={{ sm: 1, md: 2, lg: 3 }}>
|
<GridItem colSpan={{ sm: 1, md: 2, lg: 3 }}>
|
||||||
<Description name={`${t('book.ipfs_cid') ?? 'IPFS CID'}: `}>
|
<Description name={`${t('book.ipfs_cid') ?? 'IPFS CID'}: `}>
|
||||||
{ipfs_cid}
|
{ipfs_cid}
|
||||||
|
@ -88,7 +88,7 @@ const BookDetailsCard: React.FC<IProps> = (props) => {
|
||||||
</CardBody>
|
</CardBody>
|
||||||
<CardFooter flexDirection="column">
|
<CardFooter flexDirection="column">
|
||||||
|
|
||||||
<SimpleGrid columns={{ sm: 2, md: 3, lg: 4, xl: 5 }} spacing={{ base: 2, md: 4 }}>
|
{/* <SimpleGrid columns={{ sm: 2, md: 3, lg: 4, xl: 5 }} spacing={{ base: 2, md: 4 }}>
|
||||||
{ipfsGateways.map((gateway) => (
|
{ipfsGateways.map((gateway) => (
|
||||||
<Button
|
<Button
|
||||||
as={ExternalLink}
|
as={ExternalLink}
|
||||||
|
@ -100,9 +100,9 @@ const BookDetailsCard: React.FC<IProps> = (props) => {
|
||||||
</Button>
|
</Button>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
</SimpleGrid>
|
</SimpleGrid> */}
|
||||||
|
|
||||||
{/* <Flex><Text fontWeight={'bold'}>{t('disclaimer.nolink_warning')}</Text></Flex> */}
|
<Flex><Text fontWeight={'bold'}>{t('disclaimer.nolink_warning')}</Text></Flex>
|
||||||
|
|
||||||
<Flex justify="flex-end">
|
<Flex justify="flex-end">
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
"input": "Input..."
|
"input": "Input..."
|
||||||
},
|
},
|
||||||
"disclaimer": {
|
"disclaimer": {
|
||||||
"nolink_warning": "WARNING: This platform does not host any kind of link to copyrighted material. It just displays CID related to IPFS resources."
|
"nolink_warning": "WARNING: This platform does not host any kind of link to copyrighted material."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -231,7 +231,7 @@
|
||||||
"input": "Scrivi..."
|
"input": "Scrivi..."
|
||||||
},
|
},
|
||||||
"disclaimer": {
|
"disclaimer": {
|
||||||
"nolink_warning": "IMPORTANTE: Questa piattaforma non ospita nessun tipo di link a materiale protetto da copyright. Vengono mostrati solamente CID relativi a risorse IPFS."
|
"nolink_warning": "IMPORTANTE: Questa piattaforma non ospita nessun tipo di link a materiale protetto da copyright."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue