mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
fix dropdown css, add new selection after delete
This commit is contained in:
parent
d0b420f383
commit
eddc424379
@ -1,4 +1,4 @@
|
|||||||
hr .divider {
|
hr.divider {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { fetchApi } from '../utils'
|
import { fetchApi } from '../utils'
|
||||||
import reduceList, * as listActions from './utils/list'
|
import reduceList, * as listActions from './utils/list'
|
||||||
|
import { selectRelative } from './flowView'
|
||||||
|
|
||||||
import * as msgQueueActions from './msgQueue'
|
import * as msgQueueActions from './msgQueue'
|
||||||
import * as websocketActions from './websocket'
|
import * as websocketActions from './websocket'
|
||||||
@ -210,8 +211,14 @@ export function updateFlow(item) {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
export function removeFlow(id) {
|
export function removeFlow(id) {
|
||||||
return (dispatch) => {
|
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())
|
dispatch(select())
|
||||||
|
else
|
||||||
|
dispatch(selectRelative(currentIndex == maxIndex ? -1 : 1) )
|
||||||
dispatch({ type: REMOVE, id })
|
dispatch({ type: REMOVE, id })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user