diff --git a/lib/gather/controller.js b/lib/gather/controller.js index 4af5642..20cd6a5 100644 --- a/lib/gather/controller.js +++ b/lib/gather/controller.js @@ -5,6 +5,7 @@ * * Server API * gather:refresh - Refreshes active gather + * gather:notification - Creates a notification * * Client API * gather:join - Assigns user to gather @@ -13,23 +14,38 @@ */ var Gather = require("./gather"); -var latestGather = new Gather(); +var gather = new Gather(); module.exports = function (namespace) { var refreshGather = function () { namespace.emit("gather:refresh", { - gather: gather + gather: gather.toJson() }); }; namespace.on("connection", function (socket) { - socket.on("gather:join", function (data) { + if (gather.can("addGatherer")) { + gather.addGatherer(socket._user); + refreshGather(); + } + }); + socket.on("gather:leave", function (data) { + if (gather.can("removeGatherer")) { + gather.removeGatherer(socket._user); + refreshGather(); + } + }); + + socket.on("disconnect", function () { + }); socket.on("gather:vote", function (data) { }); + + refreshGather(); }); }; diff --git a/lib/gather/gather.js b/lib/gather/gather.js index 32135c8..c5600ba 100644 --- a/lib/gather/gather.js +++ b/lib/gather/gather.js @@ -136,9 +136,8 @@ Gather.prototype.marines = function () { Gather.prototype.toJson = function () { return { - lobby: this.lobby(), - marines: this.marines(), - aliens: this.aliens() + gatherers: this.gatherers, + state: this.current } }; diff --git a/lib/react/app.jsx b/lib/react/app.jsx index 6e2ea45..2ee1820 100644 --- a/lib/react/app.jsx +++ b/lib/react/app.jsx @@ -67,6 +67,12 @@ var UserLine = React.createClass({ }); var UserMenu = React.createClass({ + getDefaultProps: function () { + return { + count: 0, + users: [] + }; + }, componentDidMount: function () { socket.on('userCount', this.updateUsers); }, @@ -93,6 +99,11 @@ var UserMenu = React.createClass({ }); var Chatroom = React.createClass({ + getDefaultProps: function () { + return { + history: [] + }; + }, componentDidMount: function () { var self = this; var TIMER_INTERVAL = 60000; // Every minute @@ -129,7 +140,6 @@ var Chatroom = React.createClass({ }, scrollToBottom: function () { var node = React.findDOMNode(this.refs.messageContainer); - console.log(node) node.scrollTop = node.scrollHeight; }, render: function () { @@ -234,16 +244,40 @@ var MessageBar = React.createClass({ }); var Gather = React.createClass({ + getDefaultProps: function () { + return { + gather: { + gatherers: [] + } + } + }, + componentDidMount: function () { + var self = this; + socket.on("gather:refresh", function (data) { + self.setProps({ + gather: data.gather + }); + }); + }, joinGather: function (e) { e.preventDefault(); - alert("Joined gather!"); + socket.emit("gather:join", {}); }, render: function () { + var gatherers = this.props.gather.gatherers.map(function (gatherer) { + console.log(gatherer) + return (); + }) return (
Current Gather
+ + + {gatherers} + +
@@ -257,6 +291,14 @@ var Gather = React.createClass({ } }); +var Gatherer = React.createClass({ + render: function () { + return ( + {this.props.gatherer.user.username} + ); + } +}); + var socket; function initialiseComponents () { @@ -272,9 +314,9 @@ function initialiseComponents () { console.log("Disconnected") }); - React.render(, document.getElementById('side-menu')); - React.render(, document.getElementById('chatroom')); - React.render(, document.getElementById('gathers')); + React.render(, document.getElementById('side-menu')); + React.render(, document.getElementById('chatroom')); + React.render(, document.getElementById('gathers')); }; initialiseComponents(); diff --git a/lib/user/user.js b/lib/user/user.js index 862344c..c70e49f 100644 --- a/lib/user/user.js +++ b/lib/user/user.js @@ -14,10 +14,10 @@ this.time_zone = user['time_zone']; this.avatar = client.baseUrl + user['avatar']; this.admin = user['admin']; - this.steam = { - url: user['steam']['url'], - nickname: user['steam']['nickname'] - }; + // this.steam = { + // url: user['steam']['url'], + // nickname: user['steam']['nickname'] + // }; } module.exports = User; \ No newline at end of file diff --git a/public/js/app.js b/public/js/app.js index d76f698..322896a 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -67,6 +67,12 @@ var UserLine = React.createClass({displayName: "UserLine", }); var UserMenu = React.createClass({displayName: "UserMenu", + getDefaultProps: function () { + return { + count: 0, + users: [] + }; + }, componentDidMount: function () { socket.on('userCount', this.updateUsers); }, @@ -93,6 +99,11 @@ var UserMenu = React.createClass({displayName: "UserMenu", }); var Chatroom = React.createClass({displayName: "Chatroom", + getDefaultProps: function () { + return { + history: [] + }; + }, componentDidMount: function () { var self = this; var TIMER_INTERVAL = 60000; // Every minute @@ -129,7 +140,6 @@ var Chatroom = React.createClass({displayName: "Chatroom", }, scrollToBottom: function () { var node = React.findDOMNode(this.refs.messageContainer); - console.log(node) node.scrollTop = node.scrollHeight; }, render: function () { @@ -234,16 +244,40 @@ var MessageBar = React.createClass({displayName: "MessageBar", }); var Gather = React.createClass({displayName: "Gather", + getDefaultProps: function () { + return { + gather: { + gatherers: [] + } + } + }, + componentDidMount: function () { + var self = this; + socket.on("gather:refresh", function (data) { + self.setProps({ + gather: data.gather + }); + }); + }, joinGather: function (e) { e.preventDefault(); - alert("Joined gather!"); + socket.emit("gather:join", {}); }, render: function () { + var gatherers = this.props.gather.gatherers.map(function (gatherer) { + console.log(gatherer) + return (React.createElement(Gatherer, {gatherer: gatherer})); + }) return ( React.createElement("div", {className: "panel panel-default"}, React.createElement("div", {className: "panel-heading"}, "Current Gather" ), + React.createElement("table", {className: "table"}, + React.createElement("tbody", null, + gatherers + ) + ), React.createElement("div", {className: "panel-body"} ), React.createElement("div", {className: "panel-footer"}, @@ -257,6 +291,14 @@ var Gather = React.createClass({displayName: "Gather", } }); +var Gatherer = React.createClass({displayName: "Gatherer", + render: function () { + return ( + React.createElement("tr", null, React.createElement("td", null, this.props.gatherer.user.username)) + ); + } +}); + var socket; function initialiseComponents () { @@ -272,9 +314,9 @@ function initialiseComponents () { console.log("Disconnected") }); - React.render(React.createElement(UserMenu, {count: 0, users: []}), document.getElementById('side-menu')); - React.render(React.createElement(Chatroom, {history: []}), document.getElementById('chatroom')); - React.render(React.createElement(Gather, {history: []}), document.getElementById('gathers')); + React.render(React.createElement(UserMenu, null), document.getElementById('side-menu')); + React.render(React.createElement(Chatroom, null), document.getElementById('chatroom')); + React.render(React.createElement(Gather, null), document.getElementById('gathers')); }; initialiseComponents(); @@ -284,4 +326,4 @@ initialiseComponents(); }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmb3JtZWQuanMiLCJzb3VyY2VzIjpb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