Started working on the tabs, added selection background for filters, started expanding Storage options
This commit is contained in:
@@ -3,4 +3,6 @@ export const CHANGE_SELECTION = 'CHANGE_SELECTION';
|
||||
export const CHANGE_FILTER = 'CHANGE_FILTER';
|
||||
export const TORRENT_LIST = 'TORRENT_LIST';
|
||||
export const SET_BUTTON_STATE = 'BUTTON_STATE';
|
||||
|
||||
export const SELECTION_HASHES = 'SELECTION_HASHES';
|
||||
export const SELECTED_TAB = 'SELECTED_TAB';
|
||||
export const PEER_LIST = 'PEER_LIST';
|
||||
|
@@ -7,9 +7,13 @@ const initialState = {
|
||||
buttonState: [{startButton: "default", pauseButton: "default", stopButton: "default", deleteButton: "default", fSeedButton: "default", fRecheckButton: "default"}],
|
||||
sorting: [],
|
||||
selection: [],
|
||||
selectionHashes: [],
|
||||
filter: ["Status", ""],
|
||||
columnName: "Status",
|
||||
torrentList: [],
|
||||
peerList: [],
|
||||
torrentDetailInfo: [],
|
||||
selectedTab: 0,
|
||||
}
|
||||
|
||||
const reducer = (state = initialState, action) => {
|
||||
@@ -19,10 +23,19 @@ const reducer = (state = initialState, action) => {
|
||||
console.log("Change Selection", action.selection)
|
||||
return {
|
||||
...state,
|
||||
peerList: [], //changing selection will purge out all of the old data
|
||||
selectionHashes: [],
|
||||
selection: action.selection,
|
||||
};
|
||||
|
||||
case actionTypes.SORTLIST:
|
||||
case actionTypes.SELECTION_HASHES:
|
||||
console.log("Selection hashes REDUX", action.selectionHashes)
|
||||
return {
|
||||
...state,
|
||||
selectionHashes: action.selectionHashes,
|
||||
};
|
||||
|
||||
case actionTypes.SORTLIST: //TODO do I even need this in redux?
|
||||
console.log("List Sort", action.sorting)
|
||||
return state;
|
||||
|
||||
@@ -35,15 +48,26 @@ const reducer = (state = initialState, action) => {
|
||||
case actionTypes.TORRENT_LIST:
|
||||
return {
|
||||
...state,
|
||||
torrentList: action.torrentList
|
||||
torrentList: action.torrentList,
|
||||
};
|
||||
|
||||
case actionTypes.PEER_LIST:
|
||||
return {
|
||||
...state,
|
||||
peerList: action.peerList
|
||||
}
|
||||
|
||||
case actionTypes.SET_BUTTON_STATE:
|
||||
return {
|
||||
...state,
|
||||
buttonState: action.buttonState
|
||||
};
|
||||
|
||||
|
||||
case actionTypes.SELECTED_TAB:
|
||||
return {
|
||||
...state,
|
||||
selectedTab: action.selectedTab
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
|
Reference in New Issue
Block a user