|
|
|
@ -2,10 +2,13 @@ import PropTypes from 'prop-types';
|
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
import { createSelector } from 'reselect';
|
|
|
|
|
import * as commandNames from 'Commands/commandNames';
|
|
|
|
|
import withScrollPosition from 'Components/withScrollPosition';
|
|
|
|
|
import { executeCommand } from 'Store/Actions/commandActions';
|
|
|
|
|
import { testAllIndexers } from 'Store/Actions/indexerActions';
|
|
|
|
|
import { saveIndexerEditor, setMovieFilter, setMovieSort, setMovieTableOption } from 'Store/Actions/indexerIndexActions';
|
|
|
|
|
import scrollPositions from 'Store/scrollPositions';
|
|
|
|
|
import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector';
|
|
|
|
|
import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector';
|
|
|
|
|
import createIndexerClientSideCollectionItemsSelector from 'Store/Selectors/createIndexerClientSideCollectionItemsSelector';
|
|
|
|
|
import IndexerIndex from './IndexerIndex';
|
|
|
|
@ -13,13 +16,16 @@ import IndexerIndex from './IndexerIndex';
|
|
|
|
|
function createMapStateToProps() {
|
|
|
|
|
return createSelector(
|
|
|
|
|
createIndexerClientSideCollectionItemsSelector('indexerIndex'),
|
|
|
|
|
createCommandExecutingSelector(commandNames.APP_INDEXER_SYNC),
|
|
|
|
|
createDimensionsSelector(),
|
|
|
|
|
(
|
|
|
|
|
indexers,
|
|
|
|
|
isSyncingIndexers,
|
|
|
|
|
dimensionsState
|
|
|
|
|
) => {
|
|
|
|
|
return {
|
|
|
|
|
...indexers,
|
|
|
|
|
isSyncingIndexers,
|
|
|
|
|
isSmallScreen: dimensionsState.isSmallScreen
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
@ -46,6 +52,12 @@ function createMapDispatchToProps(dispatch, props) {
|
|
|
|
|
|
|
|
|
|
onTestAllPress() {
|
|
|
|
|
dispatch(testAllIndexers());
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onAppIndexerSyncPress() {
|
|
|
|
|
dispatch(executeCommand({
|
|
|
|
|
name: commandNames.APP_INDEXER_SYNC
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|