mirror of
				https://github.com/reduxjs/redux-devtools.git
				synced 2025-10-31 07:57:39 +03:00 
			
		
		
		
	Add monitorState
This commit is contained in:
		
							parent
							
								
									0d7142e2d2
								
							
						
					
					
						commit
						64dcb3cc17
					
				|  | @ -84,7 +84,10 @@ function liftReducer(reducer, initialState) { | ||||||
|     committedState: initialState, |     committedState: initialState, | ||||||
|     stagedActions: [INIT_ACTION], |     stagedActions: [INIT_ACTION], | ||||||
|     skippedActions: {}, |     skippedActions: {}, | ||||||
|     currentStateIndex: 0 |     currentStateIndex: 0, | ||||||
|  |     monitorState: { | ||||||
|  |       isVisible: true, | ||||||
|  |     } | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   /** |   /** | ||||||
|  | @ -96,7 +99,8 @@ function liftReducer(reducer, initialState) { | ||||||
|       stagedActions, |       stagedActions, | ||||||
|       skippedActions, |       skippedActions, | ||||||
|       computedStates, |       computedStates, | ||||||
|       currentStateIndex |       currentStateIndex, | ||||||
|  |       monitorState | ||||||
|     } = liftedState; |     } = liftedState; | ||||||
| 
 | 
 | ||||||
|     switch (liftedAction.type) { |     switch (liftedAction.type) { | ||||||
|  | @ -135,6 +139,16 @@ function liftReducer(reducer, initialState) { | ||||||
|       } |       } | ||||||
|       stagedActions = [...stagedActions, action]; |       stagedActions = [...stagedActions, action]; | ||||||
|       break; |       break; | ||||||
|  |     case ActionTypes.HIDE: | ||||||
|  |       monitorState = { | ||||||
|  |         isVisible: false, | ||||||
|  |       }; | ||||||
|  |       break; | ||||||
|  |     case ActionTypes.SHOW: | ||||||
|  |       monitorState = { | ||||||
|  |         isVisible: true, | ||||||
|  |       }; | ||||||
|  |       break; | ||||||
|     default: |     default: | ||||||
|       break; |       break; | ||||||
|     } |     } | ||||||
|  | @ -151,7 +165,8 @@ function liftReducer(reducer, initialState) { | ||||||
|       stagedActions, |       stagedActions, | ||||||
|       skippedActions, |       skippedActions, | ||||||
|       computedStates, |       computedStates, | ||||||
|       currentStateIndex |       currentStateIndex, | ||||||
|  |       monitorState | ||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user