Skip to content

Commit

Permalink
Fixed: (UI) Show available indexers count in Add Indexer
Browse files Browse the repository at this point in the history
  • Loading branch information
mynameisbogdan committed Jul 12, 2023
1 parent 4a88b70 commit 9bac299
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
17 changes: 17 additions & 0 deletions frontend/src/Indexer/Add/AddIndexerModalContent.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,20 @@
margin-left: -30px;
}
}

.modalFooter {
composes: modalFooter from '~Components/Modal/ModalFooter.css';

justify-content: space-between;
}

.available {
font-weight: bold;
}

@media only screen and (max-width: $breakpointExtraSmall) {
.modalFooter {
flex-direction: column;
gap: 10px;
}
}
2 changes: 2 additions & 0 deletions frontend/src/Indexer/Add/AddIndexerModalContent.css.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
// Please do not change this file!
interface CssExports {
'alert': string;
'available': string;
'filterContainer': string;
'filterInput': string;
'filterLabel': string;
'filterRow': string;
'indexers': string;
'modalBody': string;
'modalFooter': string;
'scroller': string;
}
export const cssExports: CssExports;
Expand Down
18 changes: 12 additions & 6 deletions frontend/src/Indexer/Add/AddIndexerModalContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,18 @@ class AddIndexerModalContent extends Component {
</Scroller>
</ModalBody>

<ModalFooter>
<Button
onPress={onModalClose}
>
{translate('Close')}
</Button>
<ModalFooter className={styles.modalFooter}>
<div className={styles.available}>
{
isPopulated ?
translate('CountIndexersAvailable', [filteredIndexers.length]) :
null
}
</div>

<div>
<Button onPress={onModalClose}>{translate('Close')}</Button>
</div>
</ModalFooter>
</ModalContent>
);
Expand Down
1 change: 1 addition & 0 deletions src/NzbDrone.Core/Localization/Core/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
"CouldNotConnectSignalR": "Could not connect to SignalR, UI won't update",
"CountApplicationsSelected": "{0} application(s) selected",
"CountDownloadClientsSelected": "{0} download client(s) selected",
"CountIndexersAvailable": "{0} indexer(s) available",
"CountIndexersSelected": "{0} indexer(s) selected",
"Custom": "Custom",
"CustomFilters": "Custom Filters",
Expand Down

0 comments on commit 9bac299

Please sign in to comment.