diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-09-16 00:56:43 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-09-16 00:56:43 +0200 |
commit | 674bc4273e9a2f1a2e41ef977a80219423c7cb51 (patch) | |
tree | b343902da8a0de10f075c46c75f8ad135bc23192 /web/src/js/components/ProxyApp.react.js | |
parent | acdd182754625fabcfc2c6ed4bdad8a63bce8ad6 (diff) | |
download | mitmproxy-674bc4273e9a2f1a2e41ef977a80219423c7cb51.tar.gz mitmproxy-674bc4273e9a2f1a2e41ef977a80219423c7cb51.tar.bz2 mitmproxy-674bc4273e9a2f1a2e41ef977a80219423c7cb51.zip |
format javascript
Diffstat (limited to 'web/src/js/components/ProxyApp.react.js')
-rw-r--r-- | web/src/js/components/ProxyApp.react.js | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/web/src/js/components/ProxyApp.react.js b/web/src/js/components/ProxyApp.react.js index fc21ecd8..01adb089 100644 --- a/web/src/js/components/ProxyApp.react.js +++ b/web/src/js/components/ProxyApp.react.js @@ -2,46 +2,46 @@ //TODO: Move out of here, just a stub. var Reports = React.createClass({ - render(){ - return (<div>Report Editor</div>); - } + render(){ + return <div>Report Editor</div>; + } }); var ProxyAppMain = React.createClass({ getInitialState(){ - return { settings: SettingsStore.getAll() }; + return { settings: SettingsStore.getAll() }; }, componentDidMount(){ - SettingsStore.addListener("change", this.onSettingsChange); + SettingsStore.addListener("change", this.onSettingsChange); }, componentWillUnmount(){ - SettingsStore.removeListener("change", this.onSettingsChange); + SettingsStore.removeListener("change", this.onSettingsChange); }, onSettingsChange(){ - console.log("onSettingsChange"); - this.setState({settings: SettingsStore.getAll()}); + console.log("onSettingsChange"); + this.setState({settings: SettingsStore.getAll()}); }, render() { - return ( - <div id="container"> - <Header settings={this.state.settings}/> - <div id="main"><this.props.activeRouteHandler/></div> - {this.state.settings.showEventLog ? <EventLog/> : null} - <Footer/> - </div> - ); + return ( + <div id="container"> + <Header settings={this.state.settings}/> + <div id="main"><this.props.activeRouteHandler/></div> + {this.state.settings.showEventLog ? <EventLog/> : null} + <Footer/> + </div> + ); } }); var ProxyApp = ( - <ReactRouter.Routes location="hash"> - <ReactRouter.Route name="app" path="/" handler={ProxyAppMain}> - <ReactRouter.Route name="main" handler={TrafficTable}/> - <ReactRouter.Route name="reports" handler={Reports}/> - <ReactRouter.Redirect to="main"/> - </ReactRouter.Route> - </ReactRouter.Routes> + <ReactRouter.Routes location="hash"> + <ReactRouter.Route name="app" path="/" handler={ProxyAppMain}> + <ReactRouter.Route name="main" handler={TrafficTable}/> + <ReactRouter.Route name="reports" handler={Reports}/> + <ReactRouter.Redirect to="main"/> + </ReactRouter.Route> + </ReactRouter.Routes> ); |