diff --git a/src/renderer/common/components/Cover.tsx b/src/renderer/common/components/Cover.tsx index bce7e4a7b..654036302 100644 --- a/src/renderer/common/components/Cover.tsx +++ b/src/renderer/common/components/Cover.tsx @@ -149,4 +149,3 @@ export const CoverWithForwardedRef = React.forwardRef( }); CoverWithForwardedRef.displayName = "CoverWithForwardedRef"; - diff --git a/src/renderer/library/components/publication/PublicationCard.tsx b/src/renderer/library/components/publication/PublicationCard.tsx index 8b10f674a..940bb24e4 100644 --- a/src/renderer/library/components/publication/PublicationCard.tsx +++ b/src/renderer/library/components/publication/PublicationCard.tsx @@ -29,6 +29,7 @@ import CatalogMenu from "./menu/CatalogMenu"; import OpdsMenu from "./menu/OpdsMenu"; import { convertMultiLangStringToString, langStringIsRTL } from "readium-desktop/renderer/common/language-string"; +import { PublicationInfoOpdsWithRadix, PublicationInfoOpdsWithRadixContent, PublicationInfoOpdsWithRadixTrigger } from "../dialog/publicationInfos/PublicationInfo"; // eslint-disable-next-line @typescript-eslint/no-empty-interface interface IBaseProps extends TranslatorProps { @@ -65,30 +66,72 @@ class PublicationCard extends React.Component { // aria-controls="dialog" return (
- this.handleBookClick(e)} - onKeyPress={ - (e) => - (e.key === "Enter") && this.handleBookClick(e) - } - title={`${publicationViewMaybeOpds.documentTitle} - ${authors}`} - className={stylesPublications.publication_image_wrapper} - tabIndex={0} - > - - -
- this.handleBookClick(e)} - className={stylesPublications.publication_infos} + + { + this.props.isOpds ? + + + + + + + + + : + this.handleBookClick(e)} + onKeyPress={ + (e) => + (e.key === "Enter") && this.handleBookClick(e) + } + title={`${publicationViewMaybeOpds.documentTitle} - ${authors}`} + className={stylesPublications.publication_image_wrapper} + tabIndex={0} > -

- {pubTitleStr} -

-

- {this.truncateAuthors(authors)} -

-
+ + + } + +
+ { + this.props.isOpds ? + + + +

+ {pubTitleStr} +

+

+ {this.truncateAuthors(authors)} +

+
+
+ +
+ : + this.handleBookClick(e)} style={{cursor: "pointer"}} + className={stylesPublications.publication_infos} + > +

+ {pubTitleStr} +

+

+ {this.truncateAuthors(authors)} +

+
+ } @@ -111,11 +154,12 @@ class PublicationCard extends React.Component { e.preventDefault(); const { publicationViewMaybeOpds } = this.props; - if (this.props.isOpds) { - this.props.openInfosDialog(publicationViewMaybeOpds as IOpdsPublicationView); - } else { + // if (this.props.isOpds) { + // this.props.openInfosDialog(publicationViewMaybeOpds as IOpdsPublicationView); + // console.error("ERROR DO NOT ") + // } else { this.props.openReader(publicationViewMaybeOpds as PublicationView); - } + // } } /* function Truncate very long titles at 60 characters */ diff --git a/src/renderer/library/components/searchResult/AllPublicationPage.tsx b/src/renderer/library/components/searchResult/AllPublicationPage.tsx index bee42dd99..887393ab4 100644 --- a/src/renderer/library/components/searchResult/AllPublicationPage.tsx +++ b/src/renderer/library/components/searchResult/AllPublicationPage.tsx @@ -584,7 +584,7 @@ const CellCoverImage: React.FC { @@ -1322,7 +1322,7 @@ const CellTitle: React.FC - +