diff --git a/src/client/assets/scss/App.scss b/src/client/assets/scss/App.scss index f9962fe..e7d0e95 100644 --- a/src/client/assets/scss/App.scss +++ b/src/client/assets/scss/App.scss @@ -14,8 +14,7 @@ $size-8: 0.9rem; font-size: $size-8; } - -// global style overrides +// global style overrides pre { border-radius: 0.5rem; @@ -245,7 +244,19 @@ pre { } } -// Import +// raw file details +.raw-file-details { + padding: 1rem; + background-color: beige; + border-radius: 0.5rem; +} + +// comicvine metadata +.comicvine-metadata { + background-color: #f2f1f9; + padding: 0.8rem; + border-radius: 0.5rem; +} // Comic Detail .comic-detail { @@ -315,12 +326,13 @@ pre { // Comic Detail .control-palette { + background-color: #fff6de; display: inline-block; i { display: flex; - justify-content: center; - align-items: center; - // padding: 1.5rem 2rem; + justify-content: center; + align-items: center; + // padding: 1.5rem 2rem; } } @@ -389,7 +401,7 @@ pre { .potential-matches-container { .potential-issue-match { border-radius: 0.3rem; - background-color: $issue-color; + background-color: beige; padding: 10px; pre { padding: 5px; diff --git a/src/client/components/ComicDetail.tsx b/src/client/components/ComicDetail.tsx index d833317..0e7ce89 100644 --- a/src/client/components/ComicDetail.tsx +++ b/src/client/components/ComicDetail.tsx @@ -235,12 +235,24 @@ export const ComicDetail = ({}: ComicDetailProps): ReactElement => { orientation={"vertical"} hasDetails={false} /> + {/* action dropdown */} +
+ +
{/* raw file details */}
{!isNil(comicBookDetailData.rawFileDetails) && ( <> - + )} {/* comic vine scraped metadata */} @@ -251,13 +263,6 @@ export const ComicDetail = ({}: ComicDetailProps): ReactElement => { /> )}
- {/* action dropdown */} -
- -
{isComicBookMetadataAvailable ? : null} diff --git a/src/client/components/ComicDetail/ComicVineDetails.tsx b/src/client/components/ComicDetail/ComicVineDetails.tsx index c5461df..a86bc6d 100644 --- a/src/client/components/ComicDetail/ComicVineDetails.tsx +++ b/src/client/components/ComicDetail/ComicVineDetails.tsx @@ -7,7 +7,7 @@ import { isUndefined } from "lodash"; export const ComicVineDetails = (props): ReactElement => { const { data, updatedAt } = props; return ( -
+
ComicVine Metadata
@@ -40,14 +40,14 @@ export const ComicVineDetails = (props): ReactElement => {
- ) : ( + ) : data.resource_type ? (
Type {data.resource_type}
- )} + ) : null}
ComicVine Issue ID diff --git a/src/client/components/ComicDetail/RawFileDetails.tsx b/src/client/components/ComicDetail/RawFileDetails.tsx index 846a4f9..8a61d32 100644 --- a/src/client/components/ComicDetail/RawFileDetails.tsx +++ b/src/client/components/ComicDetail/RawFileDetails.tsx @@ -1,15 +1,20 @@ import React, { ReactElement } from "react"; import PropTypes from "prop-types"; import prettyBytes from "pretty-bytes"; +import { isUndefined } from "lodash"; export const RawFileDetails = (props): ReactElement => { - const { data } = props; + const { rawFileDetails, inferredMetadata } = props.data; + console.log(props); return ( -
+
Raw File Details
- {data.containedIn + "/" + data.name + data.extension} + {rawFileDetails.containedIn + + "/" + + rawFileDetails.name + + rawFileDetails.extension}
@@ -17,7 +22,7 @@ export const RawFileDetails = (props): ReactElement => {
Size - {prettyBytes(data.fileSize)} + {prettyBytes(rawFileDetails.fileSize)}
@@ -25,12 +30,36 @@ export const RawFileDetails = (props): ReactElement => {
Extension - {data.extension} + {rawFileDetails.extension}
+ {/* inferred metadata */} +
+
Inferred Issue Metadata
+
+
+
+ Name + + {inferredMetadata.issue.name} + +
+
+ {!isUndefined(inferredMetadata.issue.number) ? ( +
+
+ Number + + {inferredMetadata.issue.number} + +
+
+ ) : null} +
+
); @@ -40,13 +69,23 @@ export default RawFileDetails; RawFileDetails.propTypes = { data: PropTypes.shape({ - containedIn: PropTypes.string, - name: PropTypes.string, - fileSize: PropTypes.number, - path: PropTypes.string, - extension: PropTypes.string, - cover: PropTypes.shape({ - filePath: PropTypes.string, + rawFileDetails: PropTypes.shape({ + containedIn: PropTypes.string, + name: PropTypes.string, + fileSize: PropTypes.number, + path: PropTypes.string, + extension: PropTypes.string, + cover: PropTypes.shape({ + filePath: PropTypes.string, + }), + }), + inferredMetadata: PropTypes.shape({ + issue: PropTypes.shape({ + year: PropTypes.string, + name: PropTypes.string, + number: PropTypes.number, + subtitle: PropTypes.string, + }), }), }), }; diff --git a/src/client/components/DnD.tsx b/src/client/components/DnD.tsx index e47182f..e646dc9 100644 --- a/src/client/components/DnD.tsx +++ b/src/client/components/DnD.tsx @@ -69,6 +69,9 @@ export const DnD = (data) => { + + + diff --git a/src/client/components/VolumeDetail/VolumeDetail.tsx b/src/client/components/VolumeDetail/VolumeDetail.tsx index cb94ec0..f6e4ed6 100644 --- a/src/client/components/VolumeDetail/VolumeDetail.tsx +++ b/src/client/components/VolumeDetail/VolumeDetail.tsx @@ -87,7 +87,7 @@ const VolumeDetails = (props): ReactElement => { borderColorClass={ !isEmpty(issue.matches) ? "green-border" : "" } - backgroundColor={!isEmpty(issue.matches) ? "#e0f5d0" : ""} + backgroundColor={!isEmpty(issue.matches) ? "beige" : ""} onClick={() => openPotentialLibraryMatchesPanel(issue.matches) } @@ -97,7 +97,7 @@ const VolumeDetails = (props): ReactElement => { - + {"#" + issue.issue_number}