mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
[web] fix selectFlows
This commit is contained in:
parent
571c817f21
commit
8da623c603
@ -29,6 +29,6 @@ function FlowMenu({ flow }) {
|
|||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
state => ({
|
state => ({
|
||||||
flow: state.flows.list.data[state.flows.views.main.selected[0]],
|
flow: state.flows.list.byId[state.flows.views.main.selected[0]],
|
||||||
})
|
})
|
||||||
)(FlowMenu)
|
)(FlowMenu)
|
||||||
|
@ -6,7 +6,7 @@ import { Key } from '../utils.js'
|
|||||||
import Splitter from './common/Splitter'
|
import Splitter from './common/Splitter'
|
||||||
import FlowTable from './FlowTable'
|
import FlowTable from './FlowTable'
|
||||||
import FlowView from './FlowView'
|
import FlowView from './FlowView'
|
||||||
import { selectFlow, updateFilter, updateHighlight } from '../ducks/views/main'
|
import { select as selectFlow, updateFilter, updateHighlight } from '../ducks/views/main'
|
||||||
|
|
||||||
class MainView extends Component {
|
class MainView extends Component {
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ export default connect(
|
|||||||
flows: state.flows.views.main.view.data,
|
flows: state.flows.views.main.view.data,
|
||||||
filter: state.flows.views.main.filter,
|
filter: state.flows.views.main.filter,
|
||||||
highlight: state.flows.views.main.highlight,
|
highlight: state.flows.views.main.highlight,
|
||||||
selectedFlow: state.flows.list.data[state.flows.views.main.selected[0]]
|
selectedFlow: state.flows.list.byId[state.flows.views.main.selected[0]]
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
selectFlow,
|
selectFlow,
|
||||||
|
@ -4,10 +4,10 @@ import * as msgQueueActions from './msgQueue'
|
|||||||
export const MSG_TYPE = 'UPDATE_SETTINGS'
|
export const MSG_TYPE = 'UPDATE_SETTINGS'
|
||||||
export const DATA_URL = '/settings'
|
export const DATA_URL = '/settings'
|
||||||
|
|
||||||
export const RECEIVE = 'RECEIVE'
|
export const RECEIVE = 'RECEIVE'
|
||||||
export const UPDATE = 'UPDATE'
|
export const UPDATE = 'UPDATE'
|
||||||
export const REQUEST_UPDATE = 'REQUEST_UPDATE'
|
export const REQUEST_UPDATE = 'REQUEST_UPDATE'
|
||||||
export const UNKNOWN_CMD = 'SETTINGS_UNKNOWN_CMD'
|
export const UNKNOWN_CMD = 'SETTINGS_UNKNOWN_CMD'
|
||||||
|
|
||||||
const defaultState = {
|
const defaultState = {
|
||||||
settings: {},
|
settings: {},
|
||||||
|
@ -164,7 +164,9 @@ export function updateSorter(column, desc) {
|
|||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export function select(id) {
|
export function select(id) {
|
||||||
return { type: SELECT, currentSelection: getState().flows.views.main.selected[0], id }
|
return (dispatch, getState) => {
|
||||||
|
dispatch({ type: SELECT, currentSelection: getState().flows.views.main.selected[0], id })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user