From e00e8c17d83b8545a5a739de1903aa2d73d0cdba Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Sun, 31 Dec 2023 23:55:15 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=BC=20Cleaning=20up=20CV=20match=20pan?= =?UTF-8?q?el?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ComicDetail/ComicDetail.tsx | 13 +++-- .../components/ComicDetail/MatchResult.tsx | 53 ++++++++++++------- .../ComicDetail/Tabs/ComicInfoXML.tsx | 8 +-- 3 files changed, 45 insertions(+), 29 deletions(-) diff --git a/src/client/components/ComicDetail/ComicDetail.tsx b/src/client/components/ComicDetail/ComicDetail.tsx index 2c0ec24..31c9ffb 100644 --- a/src/client/components/ComicDetail/ComicDetail.tsx +++ b/src/client/components/ComicDetail/ComicDetail.tsx @@ -29,6 +29,7 @@ import ComicViewer from "react-comic-viewer"; import { extractComicArchive } from "../../actions/fileops.actions"; import { determineCoverFile } from "../../shared/utils/metadata.utils"; import axios from "axios"; +import { styled } from "styled-components"; import { COMICVINE_SERVICE_URI } from "../../constants/endpoints"; import { refineQuery } from "filename-parser"; @@ -92,6 +93,10 @@ export const ComicDetail = (data: ComicDetailProps): ReactElement => { // ); }, []); + // overridden with some styles + const StyledSlidingPanel = styled(SlidingPane)` + background: #ccc; + `; const afterOpenModal = useCallback((things) => { // references are now sync'd and can be accessed. // subtitle.style.color = "#f00"; @@ -108,9 +113,7 @@ export const ComicDetail = (data: ComicDetailProps): ReactElement => { content: (props) => ( <>
-
- -
+

Searching for:

{inferredMetadata.issue ? ( @@ -460,7 +463,7 @@ export const ComicDetail = (data: ComicDetailProps): ReactElement => { downloadCount={acquisition?.directconnect?.downloads?.length} /> - setVisible(false)} title={"Comic Vine Search Matches"} @@ -468,7 +471,7 @@ export const ComicDetail = (data: ComicDetailProps): ReactElement => { > {slidingPanelContentId !== "" && contentForSlidingPanel[slidingPanelContentId].content()} - + )} diff --git a/src/client/components/ComicDetail/MatchResult.tsx b/src/client/components/ComicDetail/MatchResult.tsx index bc4e968..07905b6 100644 --- a/src/client/components/ComicDetail/MatchResult.tsx +++ b/src/client/components/ComicDetail/MatchResult.tsx @@ -38,49 +38,62 @@ export const MatchResult = (props: MatchResultProps) => { } return (
-
-
+
+
-
-
{match.name}
- Number - {match.issue_number} - Cover Date - {match.cover_date} +
+ {match.name ?

{match.name}

: null} + + + + + + + {parseInt(match.issue_number, 10)} + + + + + + + + Cover Date: {match.cover_date} + + +
{ellipsize(issueDescription, 300)}
-
+
-
{match.volume.name}
-
- Total Issues - + {match.volume.name} +
+

+ Total Issues: {match.volumeInformation.results.count_of_issues} - +

+

+ Publisher: + {match.volumeInformation.results.publisher.name} +

- - Publisher - - {match.volumeInformation.results.publisher.name} -