diff --git a/app/src/components/Files.js b/app/src/components/Files.js index caac113f..0ac05793 100644 --- a/app/src/components/Files.js +++ b/app/src/components/Files.js @@ -13,7 +13,6 @@ import { } from "semantic-ui-react"; import { CardGroupCentered, - CardLink, CardPosterLink, cardTitleWrapper, ExternalCardLink, @@ -182,26 +181,23 @@ function ImageRowCells({file}) { } // Fragment for SelectableRow - return ( + return {poster} - + {textEllipsis(file.title || file.stem || file.path)} - + - ) + } export function EbookRowCells({file}) { const {ebook} = file; - const downloadUrl = `/download/${encodeURIComponent(file.path)}`; - const viewerUrl = file['mimetype'].startsWith('application/epub') ? `/epub.html?url=${downloadUrl}` : null; - let cover = ; if (ebook && ebook.cover_path) { const coverSrc = `/media/${encodeURIComponent(ebook.cover_path)}`; @@ -209,16 +205,16 @@ export function EbookRowCells({file}) { } // Fragment for SelectableRow - return ( + return {cover} - + {textEllipsis(ebook.title || file.title)} - + - ) + } function FileRow({file}) { @@ -235,15 +231,14 @@ function FileRow({file}) { } else if (isEbookType) { return ; } - const onDownloadFile = async () => window.open(`/media/${file.key}`); // Fragment for SelectableRow return - onDownloadFile()}> - {textEllipsis(file.title)} + + {textEllipsis(file.title)} }
{textEllipsis(file.title || file.stem || file.path)}