diff --git a/package.json b/package.json index b90fdbd..0818d79 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "react-window-dynamic-list": "^2.3.5", "sharp": "^0.28.1", "socket.io-client": "^4.1.2", - "threetwo-ui-typings": "^1.0.1", + "threetwo-ui-typings": "^1.0.2", "voca": "^1.4.0", "websocket": "^1.0.34", "ws": "^7.5.3", diff --git a/src/client/actions/fileops.actions.tsx b/src/client/actions/fileops.actions.tsx index 3a754cb..746505e 100644 --- a/src/client/actions/fileops.actions.tsx +++ b/src/client/actions/fileops.actions.tsx @@ -71,7 +71,7 @@ export const fetchComicBookMetadata = (options) => async (dispatch) => { socket.on("disconnect", () => { console.log(`disconnect`); }); - socket.emit("importComicsInDB", { + socket.emit("importComicsToDB", { action: "getComicCovers", params: { extractionOptions, @@ -80,6 +80,7 @@ export const fetchComicBookMetadata = (options) => async (dispatch) => { }); socket.on("comicBookCoverMetadata", (data: IExtractedComicBookCoverFile) => { + console.log("Recd cover"); dispatch({ type: IMS_COMICBOOK_METADATA_FETCHED, data, @@ -88,11 +89,11 @@ export const fetchComicBookMetadata = (options) => async (dispatch) => { }); }; -export const getRecentlyImportedComicBooks = (options) => async (dispatch) => { +export const getComicBooks = (options) => async (dispatch) => { const { paginationOptions } = options; return axios .request({ - url: "http://localhost:3000/api/import/getRecentlyImportedComicBooks", + url: "http://localhost:3000/api/import/getComicBooks", method: "POST", data: { paginationOptions, diff --git a/src/client/assets/scss/App.scss b/src/client/assets/scss/App.scss index f4d5067..6387238 100644 --- a/src/client/assets/scss/App.scss +++ b/src/client/assets/scss/App.scss @@ -59,7 +59,6 @@ $border-color: red; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); column-gap: 0.5em; row-gap: 1.2em; - min-height: 30px; .card { max-width: 500px; @@ -76,12 +75,11 @@ $border-color: red; align-self: center; .image { max-width: 60px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-top-left-radius: 0.25em; - border-bottom-left-radius: 0.25em; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-top-left-radius: 0.25em; + border-bottom-left-radius: 0.25em; } - } .card-content { align-self: center; @@ -111,6 +109,23 @@ $border-color: red; } } +// Library +.library { + table { + td { + border: 0 none; + .card { + .name { + margin: 0 0 4px 0; + } + } + } + tbody { + padding: 10px 0 0 0; + } + } +} + .comic-vine-match-drawer { // comic detail drawer .search-criteria-card { diff --git a/src/client/components/Dashboard.tsx b/src/client/components/Dashboard.tsx index 74f6a97..8ff10f9 100644 --- a/src/client/components/Dashboard.tsx +++ b/src/client/components/Dashboard.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { connect } from "react-redux"; import ZeroState from "./ZeroState"; import { RecentlyImported } from "./RecentlyImported"; -import { getRecentlyImportedComicBooks } from "../actions/fileops.actions"; +import { getComicBooks } from "../actions/fileops.actions"; import { isEmpty } from "lodash"; interface IProps { @@ -52,7 +52,7 @@ function mapStateToProps(state: IState) { const mapDispatchToProps = (dispatch) => ({ getRecentComics() { dispatch( - getRecentlyImportedComicBooks({ + getComicBooks({ paginationOptions: { page: 0, limit: 5, diff --git a/src/client/components/Library.tsx b/src/client/components/Library.tsx index 2c22672..8f3899e 100644 --- a/src/client/components/Library.tsx +++ b/src/client/components/Library.tsx @@ -11,6 +11,7 @@ import { } from "../shared/utils/formatting.utils"; import { useTable } from "react-table"; import prettyBytes from "pretty-bytes"; +import ellipsize from "ellipsize"; import { useDispatch, useSelector } from "react-redux"; @@ -47,9 +48,19 @@ export const Library = ({}: IComicBookLibraryProps): ReactElement => {