aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/ProxyApp.jsx
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-07-21 01:14:55 -0700
committerMaximilian Hils <git@maximilianhils.com>2016-07-21 01:14:55 -0700
commit8a3a21bba1e6706295cc22e1b3a876a7a86cb705 (patch)
tree9408324d45850fd4def75c60cf3537a12f632217 /web/src/js/components/ProxyApp.jsx
parent427fffbcb82ba16dd65a4fee4000a05215e859b8 (diff)
downloadmitmproxy-8a3a21bba1e6706295cc22e1b3a876a7a86cb705.tar.gz
mitmproxy-8a3a21bba1e6706295cc22e1b3a876a7a86cb705.tar.bz2
mitmproxy-8a3a21bba1e6706295cc22e1b3a876a7a86cb705.zip
web: fix ValueEditor, clean up code
Diffstat (limited to 'web/src/js/components/ProxyApp.jsx')
-rw-r--r--web/src/js/components/ProxyApp.jsx21
1 files changed, 14 insertions, 7 deletions
diff --git a/web/src/js/components/ProxyApp.jsx b/web/src/js/components/ProxyApp.jsx
index 2962fc2b..f8a6e262 100644
--- a/web/src/js/components/ProxyApp.jsx
+++ b/web/src/js/components/ProxyApp.jsx
@@ -1,14 +1,11 @@
import React, { Component, PropTypes } from 'react'
-import ReactDOM from 'react-dom'
-import _ from 'lodash'
import { connect } from 'react-redux'
import { init as appInit, destruct as appDestruct } from '../ducks/app'
-import { onKeyDown } from '../ducks/ui'
+import { onKeyDown } from '../ducks/ui/keyboard'
import Header from './Header'
import EventLog from './EventLog'
import Footer from './Footer'
-import { Key } from '../utils.js'
class ProxyAppMain extends Component {
@@ -27,6 +24,15 @@ class ProxyAppMain extends Component {
}
componentWillReceiveProps(nextProps) {
+ /*
+ FIXME: improve react-router -> redux integration.
+ if (nextProps.location.query[Query.SEARCH] !== nextProps.filter) {
+ this.props.updateFilter(nextProps.location.query[Query.SEARCH], false)
+ }
+ if (nextProps.location.query[Query.HIGHLIGHT] !== nextProps.highlight) {
+ this.props.updateHighlight(nextProps.location.query[Query.HIGHLIGHT], false)
+ }
+ */
if (nextProps.query === this.props.query && nextProps.selectedFlowId === this.props.selectedFlowId && nextProps.panel === this.props.panel) {
return
}
@@ -35,13 +41,14 @@ class ProxyAppMain extends Component {
} else {
this.context.router.replace({ pathname: '/flows', query: nextProps.query })
}
+
}
render() {
const { showEventLog, location, children, query } = this.props
return (
<div id="container" tabIndex="0">
- <Header ref="header" query={query} />
+ <Header/>
{React.cloneElement(
children,
{ ref: 'view', location, query }
@@ -58,8 +65,8 @@ class ProxyAppMain extends Component {
export default connect(
state => ({
showEventLog: state.eventLog.visible,
- query: state.ui.query,
- panel: state.ui.panel,
+ query: state.flowView.filter,
+ panel: state.ui.flow.tab,
selectedFlowId: state.flows.selected[0]
}),
{