diff --git a/.gitignore b/.gitignore index 8ffb97a..a02598a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ comics/ docs/ userdata/ dist/ +storybook-static/* src/client/assets/scss/App.css /server/ node_modules/ diff --git a/package.json b/package.json index 155a1a3..dd59557 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "threetwo", - "version": "0.0.2", - "description": "ThreeTwo! A comic book curator.", + "version": "0.1.0", + "description": "ThreeTwo! A good comic book curator.", "main": "server/index.js", "typings": "server/index.js", "scripts": { @@ -19,7 +19,7 @@ "@dnd-kit/sortable": "^7.0.2", "@dnd-kit/utilities": "^3.2.1", "@fortawesome/fontawesome-free": "^6.3.0", - "@redux-devtools/extension": "^3.2.5", + "@popperjs/core": "^2.11.8", "@rollup/plugin-node-resolve": "^15.0.1", "@tanstack/react-query": "^5.0.5", "@tanstack/react-table": "^8.9.3", @@ -38,10 +38,12 @@ "filename-parser": "^1.0.2", "final-form": "^4.20.2", "final-form-arrays": "^3.0.2", + "focus-trap-react": "^10.2.3", "history": "^5.3.0", "html-to-text": "^8.1.0", "immer": "^10.0.3", "jsdoc": "^3.6.10", + "keen-slider": "^6.8.6", "lodash": "^4.17.21", "pretty-bytes": "^5.6.0", "prop-types": "^15.8.1", @@ -49,23 +51,21 @@ "react": "^18.2.0", "react-collapsible": "^2.9.0", "react-comic-viewer": "^0.4.0", - "react-day-picker": "^8.6.0", + "react-day-picker": "^8.10.0", "react-dom": "^18.2.0", "react-fast-compare": "^3.2.0", "react-final-form": "^6.5.9", "react-final-form-arrays": "^3.1.4", "react-loader-spinner": "^4.0.0", - "react-masonry-css": "^1.0.16", "react-modal": "^3.15.1", + "react-popper": "^2.3.0", "react-router": "^6.9.0", "react-router-dom": "^6.9.0", "react-select": "^5.8.0", "react-select-async-paginate": "^0.7.2", "react-sliding-pane": "^7.1.0", - "react-stickynode": "^4.1.0", "react-textarea-autosize": "^8.3.4", "reapop": "^4.2.1", - "slick-carousel": "^1.8.1", "socket.io-client": "^4.3.2", "styled-components": "^6.1.0", "threetwo-ui-typings": "^1.0.14", @@ -119,8 +119,11 @@ "rimraf": "^4.1.3", "sass": "^1.69.5", "storybook": "^7.3.2", - "tailwindcss": "^3.3.5", + "tailwindcss": "^3.4.1", "tui-jsdoc-template": "^1.2.2", "typescript": "^5.1.6" + }, + "resolutions": { + "jackspeak": "2.1.1" } } diff --git a/src/client/components/ComicDetail/AcquisitionPanel.tsx b/src/client/components/ComicDetail/AcquisitionPanel.tsx index bc851cb..86baf2b 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 @@ -133,7 +134,6 @@ export const AcquisitionPanel = ( ); setAirDCPPSearchInstance(currentInstance); setAirDCPPSearchInfo(searchInfo); - console.log("Asdas", airDCPPSearchInfo); if (currentInstance.result_count === 0) { // ...nothing was received, show an informative message to the user console.log("No more search results."); @@ -198,6 +198,8 @@ export const AcquisitionPanel = ( type, }, }); + console.log(bundleDBImportResult?.data); + queryClient.invalidateQueries({ queryKey: ["comicBookMetadata"] }); // dispatch({ // type: AIRDCPP_RESULT_DOWNLOAD_INITIATED, @@ -228,41 +230,9 @@ export const AcquisitionPanel = ( search(manualQuery, airDCPPSocketInstance); }; - // download via AirDC++ - const downloadDCPPResult = useCallback( - (searchInstanceId, resultId, name, size, type) => { - // dispatch( - // downloadAirDCPPItem( - // searchInstanceId, - // resultId, - // props.comicObjectId, - // name, - // size, - // type, - // airDCPPConfiguration.airDCPPState.socket, - // { - // username: `${airDCPPConfiguration.airDCPPState.settings.directConnect.client.host.username}`, - // password: `${airDCPPConfiguration.airDCPPState.settings.directConnect.client.host.password}`, - // }, - // ), - // ); - // this is to update the download count badge on the downloads tab - // dispatch( - // getBundlesForComic( - // props.comicObjectId, - // airDCPPConfiguration.airDCPPState.socket, - // { - // username: `${airDCPPConfiguration.airDCPPState.settings.directConnect.client.host.username}`, - // password: `${airDCPPConfiguration.airDCPPState.settings.directConnect.client.host.password}`, - // }, - // ), - // ); - }, - [], - ); return ( <> -