mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 13:57:11 -04:00
Fixed: Indexer Index enabled count in footer
This commit is contained in:
parent
d8cc1094c4
commit
6ef9c9003c
4 changed files with 16 additions and 14 deletions
|
@ -22,9 +22,9 @@ import translate from 'Utilities/String/translate';
|
|||
import getSelectedIds from 'Utilities/Table/getSelectedIds';
|
||||
import selectAll from 'Utilities/Table/selectAll';
|
||||
import toggleSelected from 'Utilities/Table/toggleSelected';
|
||||
import IndexerIndexFooterConnector from './IndexerIndexFooterConnector';
|
||||
import MovieIndexFilterMenu from './Menus/MovieIndexFilterMenu';
|
||||
import MovieIndexSortMenu from './Menus/MovieIndexSortMenu';
|
||||
import MovieIndexFooterConnector from './MovieIndexFooterConnector';
|
||||
import MovieIndexTableConnector from './Table/MovieIndexTableConnector';
|
||||
import MovieIndexTableOptionsConnector from './Table/MovieIndexTableOptionsConnector';
|
||||
import styles from './IndexerIndex.css';
|
||||
|
@ -422,7 +422,7 @@ class IndexerIndex extends Component {
|
|||
|
||||
{
|
||||
!isMovieEditorActive &&
|
||||
<MovieIndexFooterConnector />
|
||||
<IndexerIndexFooterConnector />
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@ import React, { PureComponent } from 'react';
|
|||
import DescriptionList from 'Components/DescriptionList/DescriptionList';
|
||||
import DescriptionListItem from 'Components/DescriptionList/DescriptionListItem';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './MovieIndexFooter.css';
|
||||
import styles from './IndexerIndexFooter.css';
|
||||
|
||||
class MovieIndexFooter extends PureComponent {
|
||||
class IndexerIndexFooter extends PureComponent {
|
||||
|
||||
render() {
|
||||
const {
|
||||
|
@ -15,13 +15,13 @@ class MovieIndexFooter extends PureComponent {
|
|||
} = this.props;
|
||||
|
||||
const count = movies.length;
|
||||
let movieFiles = 0;
|
||||
let enabled = 0;
|
||||
let torrent = 0;
|
||||
|
||||
movies.forEach((s) => {
|
||||
|
||||
if (s.hasFile) {
|
||||
movieFiles += 1;
|
||||
if (s.enable) {
|
||||
enabled += 1;
|
||||
}
|
||||
|
||||
if (s.protocol === 'torrent') {
|
||||
|
@ -67,7 +67,7 @@ class MovieIndexFooter extends PureComponent {
|
|||
|
||||
<DescriptionListItem
|
||||
title={translate('Enabled')}
|
||||
data={movieFiles}
|
||||
data={enabled}
|
||||
/>
|
||||
</DescriptionList>
|
||||
|
||||
|
@ -88,9 +88,9 @@ class MovieIndexFooter extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
MovieIndexFooter.propTypes = {
|
||||
IndexerIndexFooter.propTypes = {
|
||||
movies: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
colorImpairedMode: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
export default MovieIndexFooter;
|
||||
export default IndexerIndexFooter;
|
|
@ -3,7 +3,7 @@ import { createSelector } from 'reselect';
|
|||
import createClientSideCollectionSelector from 'Store/Selectors/createClientSideCollectionSelector';
|
||||
import createDeepEqualSelector from 'Store/Selectors/createDeepEqualSelector';
|
||||
import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector';
|
||||
import MovieIndexFooter from './MovieIndexFooter';
|
||||
import IndexerIndexFooter from './IndexerIndexFooter';
|
||||
|
||||
function createUnoptimizedSelector() {
|
||||
return createSelector(
|
||||
|
@ -12,12 +12,14 @@ function createUnoptimizedSelector() {
|
|||
return indexers.items.map((s) => {
|
||||
const {
|
||||
protocol,
|
||||
privacy
|
||||
privacy,
|
||||
enable
|
||||
} = s;
|
||||
|
||||
return {
|
||||
protocol,
|
||||
privacy
|
||||
privacy,
|
||||
enable
|
||||
};
|
||||
});
|
||||
}
|
||||
|
@ -44,4 +46,4 @@ function createMapStateToProps() {
|
|||
);
|
||||
}
|
||||
|
||||
export default connect(createMapStateToProps)(MovieIndexFooter);
|
||||
export default connect(createMapStateToProps)(IndexerIndexFooter);
|
Loading…
Add table
Add a link
Reference in a new issue