aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/ProxyApp.react.js
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-09-16 00:05:06 +0200
committerMaximilian Hils <git@maximilianhils.com>2014-09-16 00:05:06 +0200
commitacdd182754625fabcfc2c6ed4bdad8a63bce8ad6 (patch)
treebd48b8c269790d31913a13ecac8969c9d6413f0e /web/src/js/components/ProxyApp.react.js
parent1d9b1f79a11feb57043be1d9d656f4c1638d3357 (diff)
downloadmitmproxy-acdd182754625fabcfc2c6ed4bdad8a63bce8ad6.tar.gz
mitmproxy-acdd182754625fabcfc2c6ed4bdad8a63bce8ad6.tar.bz2
mitmproxy-acdd182754625fabcfc2c6ed4bdad8a63bce8ad6.zip
web: implement EventLogStore
Diffstat (limited to 'web/src/js/components/ProxyApp.react.js')
-rw-r--r--web/src/js/components/ProxyApp.react.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/web/src/js/components/ProxyApp.react.js b/web/src/js/components/ProxyApp.react.js
index 7953d938..fc21ecd8 100644
--- a/web/src/js/components/ProxyApp.react.js
+++ b/web/src/js/components/ProxyApp.react.js
@@ -10,11 +10,23 @@ var Reports = React.createClass({
var ProxyAppMain = React.createClass({
- mixins: [SettingsMixin],
+ getInitialState(){
+ return { settings: SettingsStore.getAll() };
+ },
+ componentDidMount(){
+ SettingsStore.addListener("change", this.onSettingsChange);
+ },
+ componentWillUnmount(){
+ SettingsStore.removeListener("change", this.onSettingsChange);
+ },
+ onSettingsChange(){
+ console.log("onSettingsChange");
+ this.setState({settings: SettingsStore.getAll()});
+ },
render() {
return (
<div id="container">
- <Header/>
+ <Header settings={this.state.settings}/>
<div id="main"><this.props.activeRouteHandler/></div>
{this.state.settings.showEventLog ? <EventLog/> : null}
<Footer/>