Compare commits
11 Commits
elasticsea
...
vite-build
| Author | SHA1 | Date | |
|---|---|---|---|
| 7eb87b066f | |||
| 084ef3c07a | |||
| 020e5e9528 | |||
| a4adfd3e79 | |||
| 30ef01ff03 | |||
| 45bcb4102d | |||
| bcd53b3ad0 | |||
| f32feacca4 | |||
| 0b0f4681d4 | |||
| 8fb6118b50 | |||
| b929840a96 |
@@ -301,7 +301,7 @@ export const searchIssue = (query, options) => async (dispatch) => {
|
||||
case "wantedComicsPage":
|
||||
dispatch({
|
||||
type: WANTED_COMICS_FETCHED,
|
||||
data: response.data.hits,
|
||||
data: response.data.body,
|
||||
});
|
||||
break;
|
||||
case "globalSearchBar":
|
||||
@@ -314,13 +314,13 @@ export const searchIssue = (query, options) => async (dispatch) => {
|
||||
case "libraryPage":
|
||||
dispatch({
|
||||
type: SS_SEARCH_RESULTS_FETCHED,
|
||||
data: response.data.hits,
|
||||
data: response.data.body,
|
||||
});
|
||||
break;
|
||||
case "volumesPage":
|
||||
dispatch({
|
||||
type: VOLUMES_FETCHED,
|
||||
data: response.data.hits,
|
||||
data: response.data.body,
|
||||
});
|
||||
break;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import { getTransfers } from "../../actions/airdcpp.actions";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { AirDCPPSocketContext } from "../../context/AirDCPPSocket";
|
||||
import { isEmpty, isNil, isUndefined } from "lodash";
|
||||
import { searchIssue } from "../../actions/fileops.actions";
|
||||
import { determineCoverFile } from "../../shared/utils/metadata.utils";
|
||||
import MetadataPanel from "../shared/MetadataPanel";
|
||||
|
||||
@@ -46,6 +47,7 @@ export const Downloads = (props: IDownloadsProps): ReactElement => {
|
||||
})
|
||||
setBundles(foo);
|
||||
}
|
||||
|
||||
}, [issueBundles])
|
||||
|
||||
return !isNil(bundles) ?
|
||||
@@ -54,9 +56,9 @@ export const Downloads = (props: IDownloadsProps): ReactElement => {
|
||||
<h1 className="title">Downloads</h1>
|
||||
<div className="columns">
|
||||
<div className="column is-half">
|
||||
{bundles.map((bundle, idx) => {
|
||||
{bundles.map(bundle => {
|
||||
console.log(bundle);
|
||||
return <div key={idx}>
|
||||
return <>
|
||||
<MetadataPanel
|
||||
data={bundle}
|
||||
imageStyle={{ maxWidth: 80 }}
|
||||
@@ -68,33 +70,30 @@ export const Downloads = (props: IDownloadsProps): ReactElement => {
|
||||
margin: "0 0 8px 0",
|
||||
}} />
|
||||
|
||||
<table className="table is-size-7">
|
||||
<thead>
|
||||
<table className="table is-size-7">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
<th>Type</th>
|
||||
<th>Bundle ID</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{bundle.acquisition.directconnect.downloads.map((bundle, idx) => {
|
||||
return (<tr key={idx}>
|
||||
|
||||
{bundle.acquisition.directconnect.downloads.map((bundle) => {
|
||||
return(<tr>
|
||||
<td>{bundle.name}</td>
|
||||
<td>{bundle.size}</td>
|
||||
<td>{bundle.type.str}</td>
|
||||
<td><span className="tag is-warning">{bundle.bundleId}</span></td>
|
||||
</tr>)
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
{/* <pre>{JSON.stringify(bundle.acquisition.directconnect.downloads, null, 2)}</pre> */}
|
||||
</div>
|
||||
</>
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div> : <div>There are no downloads.</div>;
|
||||
</div> : <div>asd</div>;
|
||||
};
|
||||
|
||||
export default Downloads;
|
||||
|
||||
@@ -61,10 +61,9 @@ export const SearchBar = (data: ISearchBarProps): ReactElement => {
|
||||
margin: "60px 0 0 350px",
|
||||
}}
|
||||
>
|
||||
{map(searchResults, (result, idx) => (
|
||||
{map(searchResults, (result) => (
|
||||
<MetadataPanel
|
||||
data={result}
|
||||
key={idx}
|
||||
imageStyle={{ maxWidth: 70 }}
|
||||
titleStyle={{ fontSize: "0.8rem" }}
|
||||
tagsStyle={{ fontSize: "0.7rem" }}
|
||||
|
||||
@@ -19,7 +19,10 @@ export const Library = (): ReactElement => {
|
||||
const searchResults = useSelector(
|
||||
(state: RootState) => state.fileOps.libraryComics,
|
||||
);
|
||||
const searchError = useSelector((state: RootState) => state.fileOps.librarySearchError);
|
||||
const searchError = useSelector((state: RootState) => {
|
||||
console.log(state);
|
||||
return state.fileOps.librarySearchError;
|
||||
});
|
||||
const dispatch = useDispatch();
|
||||
useEffect(() => {
|
||||
dispatch(
|
||||
@@ -218,9 +221,9 @@ export const Library = (): ReactElement => {
|
||||
<div>
|
||||
<div className="library">
|
||||
<T2Table
|
||||
totalPages={searchResults.total.value}
|
||||
totalPages={searchResults.hits.total.value}
|
||||
columns={columns}
|
||||
sourceData={searchResults?.hits}
|
||||
sourceData={searchResults?.hits?.hits}
|
||||
rowClickHandler={navigateToComicDetail}
|
||||
paginationHandlers={{
|
||||
nextPage,
|
||||
|
||||
@@ -166,8 +166,8 @@ export const Volumes = (props): ReactElement => {
|
||||
<div>
|
||||
<div className="library">
|
||||
<T2Table
|
||||
sourceData={volumes?.hits}
|
||||
totalPages={volumes.hits.length}
|
||||
sourceData={volumes?.hits?.hits}
|
||||
totalPages={volumes.hits.hits.length}
|
||||
paginationHandlers={{
|
||||
nextPage: () => {},
|
||||
previousPage: () => {},
|
||||
|
||||
@@ -73,8 +73,8 @@ export const WantedComics = (props): ReactElement => {
|
||||
id: "downloadDetails",
|
||||
accessorKey: "acquisition",
|
||||
cell: data => <ol>
|
||||
{data.getValue().directconnect.downloads.map((download, idx) => {
|
||||
return <li className="is-size-7" key={idx}>{download.name}</li>;
|
||||
{data.getValue().directconnect.downloads.map(download => {
|
||||
return <li className="is-size-7">{download.name}</li>;
|
||||
})}
|
||||
</ol>
|
||||
},
|
||||
|
||||
@@ -20,6 +20,8 @@ export const T2Table = (tableOptions): ReactElement => {
|
||||
pageIndex: 1,
|
||||
pageSize: 15,
|
||||
});
|
||||
console.log(sourceData)
|
||||
|
||||
|
||||
const pagination = useMemo(
|
||||
() => ({
|
||||
@@ -79,12 +81,12 @@ export const T2Table = (tableOptions): ReactElement => {
|
||||
{/* <p>{totalPages} comics in all</p> */}
|
||||
</div>
|
||||
<div className="field has-addons">
|
||||
<div className="control">
|
||||
<p className="control">
|
||||
<div className="button" onClick={() => goToPreviousPage()}> <i className="fas fa-chevron-left"></i></div>
|
||||
</div>
|
||||
<div className="control">
|
||||
</p>
|
||||
<p className="control">
|
||||
<div className="button" onClick={() => goToNextPage()}> <i className="fas fa-chevron-right"></i> </div>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<div className="field has-addons ml-5">
|
||||
<p className="control">
|
||||
|
||||
@@ -246,7 +246,7 @@ function fileOpsReducer(state = initialState, action) {
|
||||
case WANTED_COMICS_FETCHED: {
|
||||
const foo = [];
|
||||
if (!isUndefined(action.data.hits)) {
|
||||
map(action.data.hits, ({ _source }) => {
|
||||
map(action.data.hits.hits, ({ _source }) => {
|
||||
foo.push(_source);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6021,9 +6021,9 @@ htmlparser2@^6.1.0:
|
||||
entities "^2.0.0"
|
||||
|
||||
http-cache-semantics@^4.1.0:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a"
|
||||
integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
|
||||
integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==
|
||||
|
||||
http-errors@2.0.0:
|
||||
version "2.0.0"
|
||||
|
||||
Reference in New Issue
Block a user