mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-02-18 04:20:45 +03:00
Merge remote-tracking branch 'gaearon/master'
This commit is contained in:
commit
6f839bdc10
|
@ -6,7 +6,8 @@ const ActionTypes = {
|
||||||
SWEEP: 'SWEEP',
|
SWEEP: 'SWEEP',
|
||||||
TOGGLE_ACTION: 'TOGGLE_ACTION',
|
TOGGLE_ACTION: 'TOGGLE_ACTION',
|
||||||
JUMP_TO_STATE: 'JUMP_TO_STATE',
|
JUMP_TO_STATE: 'JUMP_TO_STATE',
|
||||||
SET_MONITOR_STATE: 'SET_MONITOR_STATE'
|
SET_MONITOR_STATE: 'SET_MONITOR_STATE',
|
||||||
|
RECOMPUTE_STATES: 'RECOMPUTE_STATES'
|
||||||
};
|
};
|
||||||
|
|
||||||
const INIT_ACTION = {
|
const INIT_ACTION = {
|
||||||
|
@ -141,6 +142,12 @@ function liftReducer(reducer, initialState) {
|
||||||
case ActionTypes.SET_MONITOR_STATE:
|
case ActionTypes.SET_MONITOR_STATE:
|
||||||
monitorState = liftedAction.monitorState;
|
monitorState = liftedAction.monitorState;
|
||||||
break;
|
break;
|
||||||
|
case ActionTypes.RECOMPUTE_STATES:
|
||||||
|
stagedActions = liftedAction.stagedActions;
|
||||||
|
committedState = liftedAction.committedState;
|
||||||
|
currentStateIndex = stagedActions.length - 1;
|
||||||
|
skippedActions = {};
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -227,6 +234,13 @@ export const ActionCreators = {
|
||||||
},
|
},
|
||||||
setMonitorState(monitorState) {
|
setMonitorState(monitorState) {
|
||||||
return { type: ActionTypes.SET_MONITOR_STATE, monitorState };
|
return { type: ActionTypes.SET_MONITOR_STATE, monitorState };
|
||||||
|
},
|
||||||
|
recomputeStates(committedState, stagedActions) {
|
||||||
|
return {
|
||||||
|
type: ActionTypes.RECOMPUTE_STATES,
|
||||||
|
committedState,
|
||||||
|
stagedActions
|
||||||
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,9 @@ const styles = {
|
||||||
|
|
||||||
export default class LogMonitor {
|
export default class LogMonitor {
|
||||||
constructor() {
|
constructor() {
|
||||||
window.addEventListener('keydown', ::this.handleKeyPress);
|
if (typeof window !== 'undefined') {
|
||||||
|
window.addEventListener('keydown', ::this.handleKeyPress);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user