diff --git a/src/client/components/ComicDetail/AcquisitionPanel.tsx b/src/client/components/ComicDetail/AcquisitionPanel.tsx index 40bfdab..93324e4 100644 --- a/src/client/components/ComicDetail/AcquisitionPanel.tsx +++ b/src/client/components/ComicDetail/AcquisitionPanel.tsx @@ -8,7 +8,7 @@ import { difference } from "../../shared/utils/object.utils"; import { isEmpty, isNil, map } from "lodash"; import { useStore } from "../../store"; import { useShallow } from "zustand/react/shallow"; -import { useQuery } from "@tanstack/react-query"; +import { useQuery, useQueryClient } from "@tanstack/react-query"; import axios from "axios"; interface IAcquisitionPanelProps { @@ -57,6 +57,7 @@ export const AcquisitionPanel = ( const [airDCPPSearchStatus, setAirDCPPSearchStatus] = useState(false); const [airDCPPSearchInstance, setAirDCPPSearchInstance] = useState({}); const [airDCPPSearchInfo, setAirDCPPSearchInfo] = useState({}); + const queryClient = useQueryClient(); // Construct a AirDC++ query based on metadata inferred, upon component mount // Pre-populate the search input with the search string, so that @@ -199,6 +200,8 @@ export const AcquisitionPanel = ( }, }); + queryClient.invalidateQueries({ queryKey: ["comicBookMetadata"] }); + // dispatch({ // type: AIRDCPP_RESULT_DOWNLOAD_INITIATED, // downloadResult, diff --git a/src/client/components/ComicDetail/ComicDetail.tsx b/src/client/components/ComicDetail/ComicDetail.tsx index a735f90..042451f 100644 --- a/src/client/components/ComicDetail/ComicDetail.tsx +++ b/src/client/components/ComicDetail/ComicDetail.tsx @@ -230,17 +230,6 @@ export const ComicDetail = (data: ComicDetailProps): ReactElement => { }, { id: 6, - icon: ( - - {/* download count */} - - - 34 - - - - - ), name: "Downloads", content: !isNil(data.data) && !isEmpty(data.data) ? ( diff --git a/src/client/components/ComicDetail/ComicDetailContainer.tsx b/src/client/components/ComicDetail/ComicDetailContainer.tsx index 1f4e427..4701f3f 100644 --- a/src/client/components/ComicDetail/ComicDetailContainer.tsx +++ b/src/client/components/ComicDetail/ComicDetailContainer.tsx @@ -24,7 +24,6 @@ export const ComicDetailContainer = (): ReactElement | null => { }, }), }); - console.log(comicBookDetailData); { isError && <>Error; diff --git a/src/client/components/ComicDetail/DownloadsPanel.tsx b/src/client/components/ComicDetail/DownloadsPanel.tsx index cb3c209..f05b0bc 100644 --- a/src/client/components/ComicDetail/DownloadsPanel.tsx +++ b/src/client/components/ComicDetail/DownloadsPanel.tsx @@ -85,7 +85,9 @@ export const DownloadsPanel = (
{ellipsize(bundle.name, 58)}
- {bundle.target} + + {ellipsize(bundle.target, 68)} + {prettyBytes(bundle.size)} diff --git a/src/client/components/ComicDetail/Tabs/ArchiveOperations.tsx b/src/client/components/ComicDetail/Tabs/ArchiveOperations.tsx index 9ac15fd..f47d143 100644 --- a/src/client/components/ComicDetail/Tabs/ArchiveOperations.tsx +++ b/src/client/components/ComicDetail/Tabs/ArchiveOperations.tsx @@ -7,7 +7,7 @@ import { analyzeImage } from "../../../actions/fileops.actions"; import { Canvas } from "../../shared/Canvas"; import { useQuery } from "@tanstack/react-query"; import axios from "axios"; -import { LIBRARY_SERVICE_BASE_URI } from "../../../constants/endpoints"; +import { LIBRARY_SERVICE_HOST } from "../../../constants/endpoints"; export const ArchiveOperations = (props): ReactElement => { const { data } = props; @@ -28,6 +28,10 @@ export const ArchiveOperations = (props): ReactElement => { // current image const [currentImage, setCurrentImage] = useState([]); + const constructImagePaths = (data): Array => { + return data?.data.map((path: string) => `${LIBRARY_SERVICE_HOST}/${path}`); + }; + const { data: uncompressedArchive, refetch, @@ -36,7 +40,7 @@ export const ArchiveOperations = (props): ReactElement => { queryFn: async () => await axios({ method: "POST", - url: `${LIBRARY_SERVICE_BASE_URI}/uncompressFullArchive`, + url: `http://localhost:3000/api/jobqueue/uncompressFullArchive`, headers: { "Content-Type": "application/json; charset=utf-8", }, @@ -52,9 +56,9 @@ export const ArchiveOperations = (props): ReactElement => { }, }), queryKey: [""], + select: constructImagePaths, enabled: false, }); - console.log(uncompressedArchive); // sliding panel init const contentForSlidingPanel = { // imageAnalysis: { diff --git a/src/client/constants/endpoints.ts b/src/client/constants/endpoints.ts index 4aaa7c4..65ad90d 100644 --- a/src/client/constants/endpoints.ts +++ b/src/client/constants/endpoints.ts @@ -8,7 +8,6 @@ export const hostURIBuilder = (options: Record): string => { options.apiPath ); }; -console.log(import.meta); export const CORS_PROXY_SERVER_URI = hostURIBuilder({ protocol: "http", diff --git a/src/client/store/index.ts b/src/client/store/index.ts index bc836c3..6de5b96 100644 --- a/src/client/store/index.ts +++ b/src/client/store/index.ts @@ -254,5 +254,3 @@ if (!isNil(directConnectConfiguration)) { } else { console.log("problem"); } - -console.log("connected?", getState());