AirDC++ is not configured. Please configure it in{" "}
Settings > AirDC++ > Connection.
diff --git a/src/client/components/ComicDetail/ComicDetail.tsx b/src/client/components/ComicDetail/ComicDetail.tsx
index afa107b..4c52279 100644
--- a/src/client/components/ComicDetail/ComicDetail.tsx
+++ b/src/client/components/ComicDetail/ComicDetail.tsx
@@ -12,6 +12,7 @@ import { Menu } from "./ActionMenu/Menu";
import { ArchiveOperations } from "./Tabs/ArchiveOperations";
import { ComicInfoXML } from "./Tabs/ComicInfoXML";
import AcquisitionPanel from "./AcquisitionPanel";
+import TorrentSearchPanel from "./TorrentSearchPanel";
import DownloadsPanel from "./DownloadsPanel";
import { VolumeInformation } from "./Tabs/VolumeInformation";
@@ -350,7 +351,7 @@ export const ComicDetail = (data: ComicDetailProps): ReactElement => {
),
name: "Torrent Search",
- content: <>Torrents>,
+ content:
diff --git a/src/client/components/ComicDetail/TorrentSearchPanel.tsx b/src/client/components/ComicDetail/TorrentSearchPanel.tsx
new file mode 100644
index 0000000..983b561
--- /dev/null
+++ b/src/client/components/ComicDetail/TorrentSearchPanel.tsx
@@ -0,0 +1,77 @@
+import React, { useCallback, ReactElement, useEffect, useState } from "react";
+
+import { useQuery, useQueryClient } from "@tanstack/react-query";
+import axios from "axios";
+import { Form, Field } from "react-final-form";
+import { PROWLARR_SERVICE_BASE_URI } from "../../constants/endpoints";
+
+export const TorrentSearchPanel = (props): ReactElement => {
+ const [prowlarrSettingsData, setProwlarrSettingsData] = useState({});
+
+ const { data } = useQuery({
+ queryFn: async () =>
+ axios({
+ url: `${PROWLARR_SERVICE_BASE_URI}/search`,
+ method: "POST",
+ data: {
+ port: "9696",
+ apiKey: "c4f42e265fb044dc81f7e88bd41c3367",
+ offset: 0,
+ categories: [7030],
+ query: "the darkness",
+ host: "localhost",
+ limit: 100,
+ type: "search",
+ indexerIds: [2],
+ },
+ }),
+ queryKey: ["prowlarrSettingsData"],
+ });
+ console.log(data?.data);
+ return (
+ <>
+
+ >
+ );
+};
+
+export default TorrentSearchPanel;
diff --git a/src/client/components/Dashboard/Dashboard.tsx b/src/client/components/Dashboard/Dashboard.tsx
index e088307..04098a8 100644
--- a/src/client/components/Dashboard/Dashboard.tsx
+++ b/src/client/components/Dashboard/Dashboard.tsx
@@ -5,7 +5,6 @@ import { WantedComicsList } from "./WantedComicsList";
import { VolumeGroups } from "./VolumeGroups";
import { LibraryStatistics } from "./LibraryStatistics";
import { PullList } from "./PullList";
-import { getLibraryStatistics } from "../../actions/comicinfo.actions";
import { useQuery } from "@tanstack/react-query";
import axios from "axios";
import { LIBRARY_SERVICE_BASE_URI } from "../../constants/endpoints";
@@ -54,16 +53,23 @@ export const Dashboard = (): ReactElement => {
queryKey: ["volumeGroups"],
});
- //
- // const libraryStatistics = useSelector(
- // (state: RootState) => state.comicInfo.libraryStatistics,
- // );
+ const { data: statistics } = useQuery({
+ queryFn: async () =>
+ await axios({
+ url: `${LIBRARY_SERVICE_BASE_URI}/libraryStatistics`,
+ method: "GET",
+ }),
+ queryKey: ["libraryStatistics"],
+ });
+
return (
{recentComics &&
}
{/* Wanted comics */}
+ {/* Library Statistics */}
+ {statistics &&
}
{/* Volume groups */}
diff --git a/src/client/components/Dashboard/LibraryStatistics.tsx b/src/client/components/Dashboard/LibraryStatistics.tsx
index 5d5eca8..76fe2d6 100644
--- a/src/client/components/Dashboard/LibraryStatistics.tsx
+++ b/src/client/components/Dashboard/LibraryStatistics.tsx
@@ -1,113 +1,99 @@
import React, { ReactElement, useEffect } from "react";
import prettyBytes from "pretty-bytes";
import { isEmpty, isUndefined, map } from "lodash";
+import Header from "../shared/Header";
export const LibraryStatistics = (
props: ILibraryStatisticsProps,
): ReactElement => {
- // const { stats } = props;
+ const { stats } = props;
return (
-
- Your Library In Numbers
-
-
A brief snapshot of your library.
-
-
-
- -
-
- {props.stats.totalDocuments}
- {" "}
- files
+
diff --git a/src/client/components/Dashboard/PullList.tsx b/src/client/components/Dashboard/PullList.tsx
index 346bac2..8ea16f7 100644
--- a/src/client/components/Dashboard/PullList.tsx
+++ b/src/client/components/Dashboard/PullList.tsx
@@ -82,7 +82,17 @@ export const PullList = (): ReactElement => {
diff --git a/src/client/components/Settings/ProwlarrSettings/ProwlarrSettingsForm.tsx b/src/client/components/Settings/ProwlarrSettings/ProwlarrSettingsForm.tsx
new file mode 100644
index 0000000..d9f7340
--- /dev/null
+++ b/src/client/components/Settings/ProwlarrSettings/ProwlarrSettingsForm.tsx
@@ -0,0 +1,62 @@
+import React from "react";
+import { useQuery } from "@tanstack/react-query";
+import { Form, Field } from "react-final-form";
+import { PROWLARR_SERVICE_BASE_URI } from "../../../constants/endpoints";
+import axios from "axios";
+
+export const ProwlarrSettingsForm = (props) => {
+ const { data } = useQuery({
+ queryFn: async (): any => {
+ return await axios({
+ url: `${PROWLARR_SERVICE_BASE_URI}/getIndexers`,
+ method: "POST",
+ data: {
+ host: "localhost",
+ port: "9696",
+ apiKey: "c4f42e265fb044dc81f7e88bd41c3367",
+ },
+ });
+ },
+ queryKey: ["prowlarrConnectionResult"],
+ });
+ console.log(data);
+ const submitHandler = () => {};
+ const initialData = {};
+ return (
+ <>
+ Prowlarr Settings.
+
+ )}
+ />
+ >
+ );
+};
+
+export default ProwlarrSettingsForm;
diff --git a/src/client/components/Settings/Settings.tsx b/src/client/components/Settings/Settings.tsx
index eeb590b..d47966f 100644
--- a/src/client/components/Settings/Settings.tsx
+++ b/src/client/components/Settings/Settings.tsx
@@ -3,6 +3,7 @@ import { AirDCPPSettingsForm } from "./AirDCPPSettings/AirDCPPSettingsForm";
import { AirDCPPHubsForm } from "./AirDCPPSettings/AirDCPPHubsForm";
import { QbittorrentConnectionForm } from "./QbittorrentSettings/QbittorrentConnectionForm";
import { SystemSettingsForm } from "./SystemSettings/SystemSettingsForm";
+import ProwlarrSettingsForm from "./ProwlarrSettings/ProwlarrSettingsForm";
import { ServiceStatuses } from "../ServiceStatuses/ServiceStatuses";
import settingsObject from "../../constants/settings/settingsMenu.json";
import { isUndefined, map } from "lodash";
@@ -37,6 +38,14 @@ export const Settings = (props: ISettingsProps): ReactElement => {
),
},
+ {
+ id: "prwlr-connection",
+ content: (
+ <>
+
+ >
+ ),
+ },
{
id: "core-service",
content: <>a>,
diff --git a/src/client/components/shared/Header.tsx b/src/client/components/shared/Header.tsx
index 95bf3c6..4b00744 100644
--- a/src/client/components/shared/Header.tsx
+++ b/src/client/components/shared/Header.tsx
@@ -3,7 +3,7 @@ import { Link } from "react-router-dom";
type IHeaderProps = {
headerContent: string;
- subHeaderContent: string;
+ subHeaderContent: ReactElement;
iconClassNames: string;
link?: string;
};
diff --git a/src/client/constants/endpoints.ts b/src/client/constants/endpoints.ts
index 65ad90d..30600fa 100644
--- a/src/client/constants/endpoints.ts
+++ b/src/client/constants/endpoints.ts
@@ -90,3 +90,10 @@ export const QBITTORRENT_SERVICE_BASE_URI = hostURIBuilder({
port: "3060",
apiPath: `/api/qbittorrent`,
});
+
+export const PROWLARR_SERVICE_BASE_URI = hostURIBuilder({
+ protocol: "http",
+ host: import.meta.env.UNDERLYING_HOSTNAME || "localhost",
+ port: "3060",
+ apiPath: `/api/prowlarr`,
+});
diff --git a/src/client/constants/settings/settingsMenu.json b/src/client/constants/settings/settingsMenu.json
index 0233226..5b21641 100644
--- a/src/client/constants/settings/settingsMenu.json
+++ b/src/client/constants/settings/settingsMenu.json
@@ -57,7 +57,7 @@
"displayName": "Prowlarr",
"children": [
{
- "id": "prowlarr-connection",
+ "id": "prwlr-connection",
"displayName": "Connection"
},
{
diff --git a/src/client/index.tsx b/src/client/index.tsx
index 688374e..7c4c686 100644
--- a/src/client/index.tsx
+++ b/src/client/index.tsx
@@ -8,7 +8,6 @@ import { ErrorPage } from "./components/shared/ErrorPage";
const rootEl = document.getElementById("root");
const root = createRoot(rootEl);
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
-import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import Import from "./components/Import/Import";
import Dashboard from "./components/Dashboard/Dashboard";
import Search from "./components/Search/Search";
@@ -47,6 +46,5 @@ const router = createBrowserRouter([
root.render(
-
,
);