diff options
| author | Jason <jason.daurus@gmail.com> | 2016-06-14 23:52:00 +0800 | 
|---|---|---|
| committer | Jason <jason.daurus@gmail.com> | 2016-06-17 04:37:57 +0800 | 
| commit | e5bf1e930a5b6ba0b3300b02daf792d65d795202 (patch) | |
| tree | f032716e6f31d204ee3b781279c5a9e8444e1e49 /web/src/js/components/ProxyApp.jsx | |
| parent | 1fc2db85fa339f9b134d45c15d2ad4cf3d681070 (diff) | |
| download | mitmproxy-e5bf1e930a5b6ba0b3300b02daf792d65d795202.tar.gz mitmproxy-e5bf1e930a5b6ba0b3300b02daf792d65d795202.tar.bz2 mitmproxy-e5bf1e930a5b6ba0b3300b02daf792d65d795202.zip  | |
[web] FlowView and ContentView
Diffstat (limited to 'web/src/js/components/ProxyApp.jsx')
| -rw-r--r-- | web/src/js/components/ProxyApp.jsx | 36 | 
1 files changed, 17 insertions, 19 deletions
diff --git a/web/src/js/components/ProxyApp.jsx b/web/src/js/components/ProxyApp.jsx index 81272268..967cc921 100644 --- a/web/src/js/components/ProxyApp.jsx +++ b/web/src/js/components/ProxyApp.jsx @@ -1,14 +1,13 @@ -import React, { Component, PropTypes } from "react" -import ReactDOM from "react-dom" -import _ from "lodash" +import React, { Component, PropTypes } from 'react' +import ReactDOM from 'react-dom' +import _ from 'lodash'  import { connect } from 'react-redux' -import { Splitter } from "./common.js" -import Header from "./Header" -import EventLog from "./EventLog" -import Footer from "./Footer" -import { SettingsStore } from "../store/store.js" -import { Key } from "../utils.js" +import Header from './Header' +import EventLog from './EventLog' +import Footer from './Footer' +import { SettingsStore } from '../store/store.js' +import { Key } from '../utils.js'  class ProxyAppMain extends Component { @@ -67,7 +66,7 @@ class ProxyAppMain extends Component {       */      componentDidMount() {          this.focus() -        this.settingsStore.addListener("recalculate", this.onSettingsChange) +        this.settingsStore.addListener('recalculate', this.onSettingsChange)      }      /** @@ -76,7 +75,7 @@ class ProxyAppMain extends Component {       * @todo stop listening to window's key events       */      componentWillUnmount() { -        this.settingsStore.removeListener("recalculate", this.onSettingsChange) +        this.settingsStore.removeListener('recalculate', this.onSettingsChange)      }      /** @@ -113,13 +112,13 @@ class ProxyAppMain extends Component {          switch (e.keyCode) {              case Key.I: -                name = "intercept" +                name = 'intercept'                  break              case Key.L: -                name = "search" +                name = 'search'                  break              case Key.H: -                name = "highlight" +                name = 'highlight'                  break              default:                  let main = this.refs.view @@ -134,7 +133,7 @@ class ProxyAppMain extends Component {          if (name) {              const headerComponent = this.refs.header -            headerComponent.setState({ active: Header.entries.MainMenu }, () => { +            headerComponent.setState({ active: Header.entries[0] }, () => {                  headerComponent.refs.active.refs[name].select()              })          } @@ -151,12 +150,11 @@ class ProxyAppMain extends Component {                  <Header ref="header" settings={settings} updateLocation={this.updateLocation} query={query} />                  {React.cloneElement(                      children, -                    { ref: "view", location, query, updateLocation: this.updateLocation } +                    { ref: 'view', location, query, updateLocation: this.updateLocation }                  )} -                {showEventLog && [ -                    <Splitter key="splitter" axis="y"/>, +                {showEventLog && (                      <EventLog key="eventlog"/> -                ]} +                )}                  <Footer settings={settings}/>              </div>          )  | 
