From 6efe1aa6a92ce7f9f264903e9d27fb5cf6c32bfe Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 16 Sep 2014 16:26:16 +1200 Subject: We're not ready for ES6 Lets re-evaluate in June next year when it's actually released --- web/src/js/components/proxyapp.jsx | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 web/src/js/components/proxyapp.jsx (limited to 'web/src/js/components/proxyapp.jsx') diff --git a/web/src/js/components/proxyapp.jsx b/web/src/js/components/proxyapp.jsx new file mode 100644 index 00000000..c0196461 --- /dev/null +++ b/web/src/js/components/proxyapp.jsx @@ -0,0 +1,46 @@ +/** @jsx React.DOM */ + +//TODO: Move out of here, just a stub. +var Reports = React.createClass({ + render: function(){ + return
Report Editor
; + } +}); + + +var ProxyAppMain = React.createClass({ + getInitialState: function(){ + return { settings: SettingsStore.getAll() }; + }, + componentDidMount: function(){ + SettingsStore.addListener("change", this.onSettingsChange); + }, + componentWillUnmount: function(){ + SettingsStore.removeListener("change", this.onSettingsChange); + }, + onSettingsChange: function(){ + console.log("onSettingsChange"); + this.setState({settings: SettingsStore.getAll()}); + }, + render: function() { + return ( +
+
+
+ {this.state.settings.showEventLog ? : null} +
+
+ ); + } +}); + + +var ProxyApp = ( + + + + + + + +); -- cgit v1.2.3