mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 22:07:32 -04:00
New: (UI) Show indexer categories in info modal
This commit is contained in:
parent
04cf061275
commit
15e7cc7ea8
2 changed files with 54 additions and 0 deletions
|
@ -13,6 +13,10 @@ import ModalBody from 'Components/Modal/ModalBody';
|
||||||
import ModalContent from 'Components/Modal/ModalContent';
|
import ModalContent from 'Components/Modal/ModalContent';
|
||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
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 TagListConnector from 'Components/TagListConnector';
|
||||||
import { kinds } from 'Helpers/Props';
|
import { kinds } from 'Helpers/Props';
|
||||||
import DeleteIndexerModal from 'Indexer/Delete/DeleteIndexerModal';
|
import DeleteIndexerModal from 'Indexer/Delete/DeleteIndexerModal';
|
||||||
|
@ -149,6 +153,7 @@ function IndexerInfoModalContent(props: IndexerInfoModalContentProps) {
|
||||||
</DescriptionList>
|
</DescriptionList>
|
||||||
</div>
|
</div>
|
||||||
</FieldSet>
|
</FieldSet>
|
||||||
|
|
||||||
<FieldSet legend={translate('SearchCapabilities')}>
|
<FieldSet legend={translate('SearchCapabilities')}>
|
||||||
<div>
|
<div>
|
||||||
<DescriptionList>
|
<DescriptionList>
|
||||||
|
@ -237,6 +242,54 @@ function IndexerInfoModalContent(props: IndexerInfoModalContentProps) {
|
||||||
</DescriptionList>
|
</DescriptionList>
|
||||||
</div>
|
</div>
|
||||||
</FieldSet>
|
</FieldSet>
|
||||||
|
|
||||||
|
{capabilities.categories !== null &&
|
||||||
|
capabilities.categories.length > 0 ? (
|
||||||
|
<FieldSet legend={translate('IndexerCategories')}>
|
||||||
|
<Table
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
name: 'id',
|
||||||
|
label: translate('Id'),
|
||||||
|
isVisible: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'name',
|
||||||
|
label: translate('Name'),
|
||||||
|
isVisible: true,
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
{capabilities.categories
|
||||||
|
.sort((a, b) => a.id - b.id)
|
||||||
|
.map((category) => {
|
||||||
|
return (
|
||||||
|
<TableBody key={category.id}>
|
||||||
|
<TableRow key={category.id}>
|
||||||
|
<TableRowCell>{category.id}</TableRowCell>
|
||||||
|
<TableRowCell>{category.name}</TableRowCell>
|
||||||
|
</TableRow>
|
||||||
|
{category.subCategories !== null &&
|
||||||
|
category.subCategories.length > 0
|
||||||
|
? category.subCategories
|
||||||
|
.sort((a, b) => a.id - b.id)
|
||||||
|
.map((subCategory) => {
|
||||||
|
return (
|
||||||
|
<TableRow key={subCategory.id}>
|
||||||
|
<TableRowCell>{subCategory.id}</TableRowCell>
|
||||||
|
<TableRowCell>
|
||||||
|
{subCategory.name}
|
||||||
|
</TableRowCell>
|
||||||
|
</TableRow>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
: null}
|
||||||
|
</TableBody>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</Table>
|
||||||
|
</FieldSet>
|
||||||
|
) : null}
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -201,6 +201,7 @@
|
||||||
"Indexer": "Indexer",
|
"Indexer": "Indexer",
|
||||||
"IndexerAlreadySetup": "At least one instance of indexer is already setup",
|
"IndexerAlreadySetup": "At least one instance of indexer is already setup",
|
||||||
"IndexerAuth": "Indexer Auth",
|
"IndexerAuth": "Indexer Auth",
|
||||||
|
"IndexerCategories": "Indexer Categories",
|
||||||
"IndexerDetails": "Indexer Details",
|
"IndexerDetails": "Indexer Details",
|
||||||
"IndexerDisabled": "Indexer Disabled",
|
"IndexerDisabled": "Indexer Disabled",
|
||||||
"IndexerFailureRate": "Indexer Failure Rate",
|
"IndexerFailureRate": "Indexer Failure Rate",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue