mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-03 11:17:24 +00:00
fix dropdown css, add new selection after delete
This commit is contained in:
parent
d0b420f383
commit
eddc424379
2 changed files with 10 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
hr .divider {
|
||||
hr.divider {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { fetchApi } from '../utils'
|
||||
import reduceList, * as listActions from './utils/list'
|
||||
import { selectRelative } from './flowView'
|
||||
|
||||
import * as msgQueueActions from './msgQueue'
|
||||
import * as websocketActions from './websocket'
|
||||
|
|
@ -210,8 +211,14 @@ export function updateFlow(item) {
|
|||
* @private
|
||||
*/
|
||||
export function removeFlow(id) {
|
||||
return (dispatch) => {
|
||||
dispatch(select())
|
||||
return (dispatch, getState) => {
|
||||
let currentIndex = getState().flowView.indexOf[getState().flows.selected[0]]
|
||||
let maxIndex = getState().flowView.data.length - 1
|
||||
let deleteLastEntry = maxIndex == 0
|
||||
if (deleteLastEntry)
|
||||
dispatch(select())
|
||||
else
|
||||
dispatch(selectRelative(currentIndex == maxIndex ? -1 : 1) )
|
||||
dispatch({ type: REMOVE, id })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue