mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-31 12:10:19 -07:00
Initial Commit Rework
This commit is contained in:
parent
74a4cc048c
commit
95051cbd63
2483 changed files with 101351 additions and 111396 deletions
34
frontend/src/Store/Actions/wantedActionHandlers.js
Normal file
34
frontend/src/Store/Actions/wantedActionHandlers.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
import serverSideCollectionHandlers from 'Utilities/serverSideCollectionHandlers';
|
||||
import createBatchToggleEpisodeMonitoredHandler from './Creators/createBatchToggleEpisodeMonitoredHandler';
|
||||
import createServerSideCollectionHandlers from './Creators/createServerSideCollectionHandlers';
|
||||
import * as types from './actionTypes';
|
||||
|
||||
const wantedActionHandlers = {
|
||||
...createServerSideCollectionHandlers('missing', '/wanted/missing', (state) => state.wanted, {
|
||||
[serverSideCollectionHandlers.FETCH]: types.FETCH_MISSING,
|
||||
[serverSideCollectionHandlers.FIRST_PAGE]: types.GOTO_FIRST_MISSING_PAGE,
|
||||
[serverSideCollectionHandlers.PREVIOUS_PAGE]: types.GOTO_PREVIOUS_MISSING_PAGE,
|
||||
[serverSideCollectionHandlers.NEXT_PAGE]: types.GOTO_NEXT_MISSING_PAGE,
|
||||
[serverSideCollectionHandlers.LAST_PAGE]: types.GOTO_LAST_MISSING_PAGE,
|
||||
[serverSideCollectionHandlers.EXACT_PAGE]: types.GOTO_MISSING_PAGE,
|
||||
[serverSideCollectionHandlers.SORT]: types.SET_MISSING_SORT,
|
||||
[serverSideCollectionHandlers.FILTER]: types.SET_MISSING_FILTER
|
||||
}),
|
||||
|
||||
[types.BATCH_TOGGLE_MISSING_EPISODES]: createBatchToggleEpisodeMonitoredHandler('missing', (state) => state.wanted.missing),
|
||||
|
||||
...createServerSideCollectionHandlers('cutoffUnmet', '/wanted/cutoff', (state) => state.wanted, {
|
||||
[serverSideCollectionHandlers.FETCH]: types.FETCH_CUTOFF_UNMET,
|
||||
[serverSideCollectionHandlers.FIRST_PAGE]: types.GOTO_FIRST_CUTOFF_UNMET_PAGE,
|
||||
[serverSideCollectionHandlers.PREVIOUS_PAGE]: types.GOTO_PREVIOUS_CUTOFF_UNMET_PAGE,
|
||||
[serverSideCollectionHandlers.NEXT_PAGE]: types.GOTO_NEXT_CUTOFF_UNMET_PAGE,
|
||||
[serverSideCollectionHandlers.LAST_PAGE]: types.GOTO_LAST_CUTOFF_UNMET_PAGE,
|
||||
[serverSideCollectionHandlers.EXACT_PAGE]: types.GOTO_CUTOFF_UNMET_PAGE,
|
||||
[serverSideCollectionHandlers.SORT]: types.SET_CUTOFF_UNMET_SORT,
|
||||
[serverSideCollectionHandlers.FILTER]: types.SET_CUTOFF_UNMET_FILTER
|
||||
}),
|
||||
|
||||
[types.BATCH_TOGGLE_CUTOFF_UNMET_EPISODES]: createBatchToggleEpisodeMonitoredHandler('cutoffUnmet', (state) => state.wanted.cutoffUnmet)
|
||||
};
|
||||
|
||||
export default wantedActionHandlers;
|
Loading…
Add table
Add a link
Reference in a new issue