From 43ffcc16b6593a33b78da2b79d0ce3d79e336ad9 Mon Sep 17 00:00:00 2001 From: lamacchinadesiderante Date: Wed, 11 Jan 2023 19:56:24 +0100 Subject: [PATCH 1/5] fix protocol issue in query string --- frontend/src/components/Search.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Search.tsx b/frontend/src/components/Search.tsx index aa214ac..c64843c 100644 --- a/frontend/src/components/Search.tsx +++ b/frontend/src/components/Search.tsx @@ -94,7 +94,7 @@ const Search: React.FC = ({ setBooks }) => { } const copyToClipboard = () => { - const searchBase = `${window.location.host}/?`; + const searchBase = `${window.location.protocol}//${window.location.host}/?`; const searchQuery = encodeURIComponent(`title=${title}&author=${author}&language=${language}&publisher=${publisher}&isbn=${isbn}&extension=${extension}`) navigator.clipboard.writeText(`${searchBase}${searchQuery}`).then(() => { From 092e3e395e4b608e9cdf4c4d6e828cdca35bf761 Mon Sep 17 00:00:00 2001 From: lamacchinadesiderante Date: Wed, 11 Jan 2023 20:20:15 +0100 Subject: [PATCH 2/5] restore latest on docker-compose --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7ddf9e7..bf50d75 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,9 +2,9 @@ version: '3' services: zlib: - # image: lamacchinadesiderante/millelibri:latest + image: lamacchinadesiderante/millelibri:latest - image: millelibri:v0.4 + # image: millelibri:v0.4 # image: millelibri From aee545293ef80f69cbc9afb747dfc2aea780cab8 Mon Sep 17 00:00:00 2001 From: lamacchinadesiderante Date: Thu, 12 Jan 2023 11:13:40 +0100 Subject: [PATCH 3/5] disable IPFS gateway links --- frontend/src/components/BooksDetailsCard.tsx | 20 ++++++++++---------- frontend/src/i18n.json | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/BooksDetailsCard.tsx b/frontend/src/components/BooksDetailsCard.tsx index 2695966..dec5545 100644 --- a/frontend/src/components/BooksDetailsCard.tsx +++ b/frontend/src/components/BooksDetailsCard.tsx @@ -19,12 +19,12 @@ interface IProps { const BookDetailsCard: React.FC = (props) => { - const downloadLinkFromIPFS = (gateway: string, book: Book) => { - return ( - `https://${gateway}/ipfs/${book.ipfs_cid}?filename=` + - encodeURIComponent(`${book.title}_${book.author}.${book.extension}`) - ); - } + // const downloadLinkFromIPFS = (gateway: string, book: Book) => { + // return ( + // `https://${gateway}/ipfs/${book.ipfs_cid}?filename=` + + // encodeURIComponent(`${book.title}_${book.author}.${book.extension}`) + // ); + // } const { t } = useTranslation(); @@ -54,7 +54,7 @@ const BookDetailsCard: React.FC = (props) => { - {id} + {/* {id} */} {ipfs_cid} @@ -88,7 +88,7 @@ const BookDetailsCard: React.FC = (props) => { - + {/* {ipfsGateways.map((gateway) => ( ))} - + */} - {/* {t('disclaimer.nolink_warning')} */} + {t('disclaimer.nolink_warning')}