From 206c2eeb4b2e77914b467e019e998c624c179b34 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Mon, 9 Oct 2023 13:29:04 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=20Reorganized=20tabs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/actions/settings.actions.tsx | 26 ++++++++++--------- .../components/ComicDetail/ComicDetail.tsx | 11 ++++++-- .../components/ComicDetail/TabControls.tsx | 7 +++-- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/src/client/actions/settings.actions.tsx b/src/client/actions/settings.actions.tsx index 0b47384..0a9fedd 100644 --- a/src/client/actions/settings.actions.tsx +++ b/src/client/actions/settings.actions.tsx @@ -13,17 +13,17 @@ import { export const saveSettings = (settingsPayload, settingsKey: string, settingsObjectId?: string) => - async (dispatch) => { - const result = await axios({ - url: `${SETTINGS_SERVICE_BASE_URI}/saveSettings`, - method: "POST", - data: { settingsPayload, settingsKey, settingsObjectId }, - }); - dispatch({ - type: SETTINGS_OBJECT_FETCHED, - data: result.data, - }); - }; + async (dispatch) => { + const result = await axios({ + url: `${SETTINGS_SERVICE_BASE_URI}/saveSettings`, + method: "POST", + data: { settingsPayload, settingsKey, settingsObjectId }, + }); + dispatch({ + type: SETTINGS_OBJECT_FETCHED, + data: result.data, + }); + }; export const getSettings = (settingsKey?) => async (dispatch) => { const result = await axios({ @@ -85,6 +85,8 @@ export const getQBitTorrentClientInfo = (hostInfo) => async (dispatch) => { console.log(bar); dispatch({ type: SETTINGS_QBITTORRENT_TORRENTS_LIST_FETCHED, - data: bar.data + data: bar.data, }); }; + +export const getProwlarrConnectionInfo = (hostInfo) => async (dispatch) => {}; diff --git a/src/client/components/ComicDetail/ComicDetail.tsx b/src/client/components/ComicDetail/ComicDetail.tsx index 05af966..0777e55 100644 --- a/src/client/components/ComicDetail/ComicDetail.tsx +++ b/src/client/components/ComicDetail/ComicDetail.tsx @@ -198,8 +198,8 @@ export const ComicDetail = (data: ComicDetailProps): ReactElement => { }, { id: 4, - icon: , - name: "Acquisition", + icon: , + name: "DC++ Search", content: ( { }, { id: 5, + icon: , + name: "Torrent Search", + content: <>Torrents, + shouldShow: true, + }, + { + id: 6, icon: null, name: !isEmpty(data.data) ? ( Downloads diff --git a/src/client/components/ComicDetail/TabControls.tsx b/src/client/components/ComicDetail/TabControls.tsx index e5d82a6..11618cd 100644 --- a/src/client/components/ComicDetail/TabControls.tsx +++ b/src/client/components/ComicDetail/TabControls.tsx @@ -25,12 +25,15 @@ export const TabControls = (props): ReactElement => { > {/* Downloads tab and count badge */} - {id === 5 && + {id === 6 && !isNil(comicBookDetailData.acquisition.directconnect) ? ( - {comicBookDetailData.acquisition.directconnect.downloads.length} + { + comicBookDetailData.acquisition.directconnect.downloads + .length + } ) : (