|
|
@ -3,11 +3,14 @@ import { createSelector } from 'reselect';
|
|
|
|
import moment from 'moment';
|
|
|
|
import moment from 'moment';
|
|
|
|
import { isCommandExecuting } from 'Utilities/Command';
|
|
|
|
import { isCommandExecuting } from 'Utilities/Command';
|
|
|
|
import isBefore from 'Utilities/Date/isBefore';
|
|
|
|
import isBefore from 'Utilities/Date/isBefore';
|
|
|
|
|
|
|
|
import * as commandNames from 'Commands/commandNames';
|
|
|
|
import withCurrentPage from 'Components/withCurrentPage';
|
|
|
|
import withCurrentPage from 'Components/withCurrentPage';
|
|
|
|
|
|
|
|
import { executeCommand } from 'Store/Actions/commandActions';
|
|
|
|
import { searchMissing, setCalendarDaysCount, setCalendarFilter } from 'Store/Actions/calendarActions';
|
|
|
|
import { searchMissing, setCalendarDaysCount, setCalendarFilter } from 'Store/Actions/calendarActions';
|
|
|
|
import createSeriesCountSelector from 'Store/Selectors/createSeriesCountSelector';
|
|
|
|
import createSeriesCountSelector from 'Store/Selectors/createSeriesCountSelector';
|
|
|
|
import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector';
|
|
|
|
import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector';
|
|
|
|
import createCommandsSelector from 'Store/Selectors/createCommandsSelector';
|
|
|
|
import createCommandsSelector from 'Store/Selectors/createCommandsSelector';
|
|
|
|
|
|
|
|
import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector';
|
|
|
|
import CalendarPage from './CalendarPage';
|
|
|
|
import CalendarPage from './CalendarPage';
|
|
|
|
|
|
|
|
|
|
|
|
function createMissingEpisodeIdsSelector() {
|
|
|
|
function createMissingEpisodeIdsSelector() {
|
|
|
@ -59,6 +62,7 @@ function createMapStateToProps() {
|
|
|
|
createSeriesCountSelector(),
|
|
|
|
createSeriesCountSelector(),
|
|
|
|
createUISettingsSelector(),
|
|
|
|
createUISettingsSelector(),
|
|
|
|
createMissingEpisodeIdsSelector(),
|
|
|
|
createMissingEpisodeIdsSelector(),
|
|
|
|
|
|
|
|
createCommandExecutingSelector(commandNames.RSS_SYNC),
|
|
|
|
createIsSearchingSelector(),
|
|
|
|
createIsSearchingSelector(),
|
|
|
|
(
|
|
|
|
(
|
|
|
|
selectedFilterKey,
|
|
|
|
selectedFilterKey,
|
|
|
@ -66,6 +70,7 @@ function createMapStateToProps() {
|
|
|
|
seriesCount,
|
|
|
|
seriesCount,
|
|
|
|
uiSettings,
|
|
|
|
uiSettings,
|
|
|
|
missingEpisodeIds,
|
|
|
|
missingEpisodeIds,
|
|
|
|
|
|
|
|
isRssSyncExecuting,
|
|
|
|
isSearchingForMissing
|
|
|
|
isSearchingForMissing
|
|
|
|
) => {
|
|
|
|
) => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
@ -74,6 +79,7 @@ function createMapStateToProps() {
|
|
|
|
colorImpairedMode: uiSettings.enableColorImpairedMode,
|
|
|
|
colorImpairedMode: uiSettings.enableColorImpairedMode,
|
|
|
|
hasSeries: !!seriesCount,
|
|
|
|
hasSeries: !!seriesCount,
|
|
|
|
missingEpisodeIds,
|
|
|
|
missingEpisodeIds,
|
|
|
|
|
|
|
|
isRssSyncExecuting,
|
|
|
|
isSearchingForMissing
|
|
|
|
isSearchingForMissing
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -82,6 +88,12 @@ function createMapStateToProps() {
|
|
|
|
|
|
|
|
|
|
|
|
function createMapDispatchToProps(dispatch, props) {
|
|
|
|
function createMapDispatchToProps(dispatch, props) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
onRssSyncPress() {
|
|
|
|
|
|
|
|
dispatch(executeCommand({
|
|
|
|
|
|
|
|
name: commandNames.RSS_SYNC
|
|
|
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
onSearchMissingPress(episodeIds) {
|
|
|
|
onSearchMissingPress(episodeIds) {
|
|
|
|
dispatch(searchMissing({ episodeIds }));
|
|
|
|
dispatch(searchMissing({ episodeIds }));
|
|
|
|
},
|
|
|
|
},
|
|
|
|