diff options
Diffstat (limited to 'web/src/js/components/ProxyApp.jsx')
| -rw-r--r-- | web/src/js/components/ProxyApp.jsx | 37 | 
1 files changed, 16 insertions, 21 deletions
| diff --git a/web/src/js/components/ProxyApp.jsx b/web/src/js/components/ProxyApp.jsx index 1d27614f..8129b0f0 100644 --- a/web/src/js/components/ProxyApp.jsx +++ b/web/src/js/components/ProxyApp.jsx @@ -1,20 +1,18 @@ -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 { fetch as fetchSettings } from '../ducks/settings' -import { Splitter } from "./common.js" -import Header from "./Header" -import EventLog from "./EventLog" -import Footer from "./Footer" -import { Key } from "../utils.js" +import Header from './Header' +import EventLog from './EventLog' +import Footer from './Footer' +import { Key } from '../utils.js'  class ProxyAppMain extends Component {      static childContextTypes = {          returnFocus: PropTypes.func.isRequired, -        location: PropTypes.object.isRequired,      }      static contextTypes = { @@ -68,10 +66,7 @@ class ProxyAppMain extends Component {       * @todo use props       */      getChildContext() { -        return { -            returnFocus: this.focus, -            location: this.props.location -        } +        return { returnFocus: this.focus }      }      /** @@ -85,19 +80,20 @@ class ProxyAppMain extends Component {      /**       * @todo move to actions +     * @todo bind on window       */      onKeyDown(e) {          let name = null          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 @@ -112,7 +108,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()              })          } @@ -128,12 +124,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>          ) | 
