From 15e7cc7ea81c23aaf3be48195f5d4e6b05e37101 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 13 Jun 2023 07:28:32 +0300 Subject: [PATCH] New: (UI) Show indexer categories in info modal --- .../Indexer/Info/IndexerInfoModalContent.tsx | 53 +++++++++++++++++++ src/NzbDrone.Core/Localization/Core/en.json | 1 + 2 files changed, 54 insertions(+) diff --git a/frontend/src/Indexer/Info/IndexerInfoModalContent.tsx b/frontend/src/Indexer/Info/IndexerInfoModalContent.tsx index 5249e980a..71a609485 100644 --- a/frontend/src/Indexer/Info/IndexerInfoModalContent.tsx +++ b/frontend/src/Indexer/Info/IndexerInfoModalContent.tsx @@ -13,6 +13,10 @@ import ModalBody from 'Components/Modal/ModalBody'; import ModalContent from 'Components/Modal/ModalContent'; import ModalFooter from 'Components/Modal/ModalFooter'; import ModalHeader from 'Components/Modal/ModalHeader'; +import TableRowCell from 'Components/Table/Cells/TableRowCell'; +import Table from 'Components/Table/Table'; +import TableBody from 'Components/Table/TableBody'; +import TableRow from 'Components/Table/TableRow'; import TagListConnector from 'Components/TagListConnector'; import { kinds } from 'Helpers/Props'; import DeleteIndexerModal from 'Indexer/Delete/DeleteIndexerModal'; @@ -149,6 +153,7 @@ function IndexerInfoModalContent(props: IndexerInfoModalContentProps) { +
@@ -237,6 +242,54 @@ function IndexerInfoModalContent(props: IndexerInfoModalContentProps) {
+ + {capabilities.categories !== null && + capabilities.categories.length > 0 ? ( +
+ + {capabilities.categories + .sort((a, b) => a.id - b.id) + .map((category) => { + return ( + + + {category.id} + {category.name} + + {category.subCategories !== null && + category.subCategories.length > 0 + ? category.subCategories + .sort((a, b) => a.id - b.id) + .map((subCategory) => { + return ( + + {subCategory.id} + + {subCategory.name} + + + ); + }) + : null} + + ); + })} +
+
+ ) : null}