From e293e1b5ca7dd4597e34fbdf30caad4b18f9b303 Mon Sep 17 00:00:00 2001 From: Chris Blanchard Date: Wed, 22 Jul 2015 01:00:05 +0100 Subject: [PATCH] Refactored and added ensl client --- config/socketio.js | 21 ++++++++------ lib/ensl/client.js | 27 ++++++++++++++++++ lib/react/app.jsx | 59 +++++++++++++++++++++++++++++++++++++-- package.json | 4 +-- public/js/app.js | 61 +++++++++++++++++++++++++++++++++++++++-- public/js/client.js | 13 --------- views/partials/foot.hbs | 1 - 7 files changed, 156 insertions(+), 30 deletions(-) create mode 100644 lib/ensl/client.js delete mode 100644 public/js/client.js diff --git a/config/socketio.js b/config/socketio.js index 0649665..19d8117 100644 --- a/config/socketio.js +++ b/config/socketio.js @@ -2,23 +2,26 @@ var fs = require("fs"); var path = require("path"); +var enslClient = require(path.join(__dirname, "../lib/ensl/client"))(); var chatController = require(path.join(__dirname, "../lib/chat/controller")); module.exports = function (io) { var root = io.of("/"); var authorised = io.of("/authorised"); + + var id = 2131; + // Authorisation root.use(function (socket, next) { - socket._user = { - id: Math.floor(Math.random () * 10000000), - username: "Chris (" + socket.id.slice(0,5) + ")", - steamId: "11111111", - email: "cablanchard@gmail.com", - bans: [], - avatar: "http://www.ensl.org/local/avatars/6359.jpg" - }; - next(); + enslClient.getUserById({ + id: id + }, function (error, response, body) { + if (error) return next(error); + socket._user = body; + socket._user.avatar = enslClient.getFullAvatarUri(socket._user.avatar); + next(); + }); }); var refreshGatherers = function (socket) { diff --git a/lib/ensl/client.js b/lib/ensl/client.js new file mode 100644 index 0000000..10cc6e3 --- /dev/null +++ b/lib/ensl/client.js @@ -0,0 +1,27 @@ +"use strict"; + +var request = require("request"); +var env = process.env.NODE_ENV || "development"; + +function EnslClient (options) { + if (!(this instanceof EnslClient)) { + return new EnslClient(options); + } + + this.baseUrl = (env === "production") ? "http://www.ensl.org/" : "http://staging.ensl.org"; +} + +EnslClient.prototype.getUserById = function (options, callback) { + var id = options.id; + var url = this.baseUrl + "/api/v1/users/" + id; + request({ + url: url, + json: true + }, callback); +}; + +EnslClient.prototype.getFullAvatarUri = function (url) { + return this.baseUrl + url; +} + +module.exports = EnslClient; \ No newline at end of file diff --git a/lib/react/app.jsx b/lib/react/app.jsx index 9364431..5b7ba48 100644 --- a/lib/react/app.jsx +++ b/lib/react/app.jsx @@ -1,3 +1,7 @@ +$(function () { + +"use strict"; + var GatherCounter = React.createClass({ render: function () { return ( @@ -11,6 +15,32 @@ var GatherCounter = React.createClass({ } }); +var UserLogin = React.createClass({ + handleSubmit: function () { + + }, + render: function () { + return ( +
+
+ + + + +
+
+ ); + } +}) + var Gatherer = React.createClass({ render: function () { return ( @@ -39,6 +69,9 @@ var GathererMenu = React.createClass({ }); return ( @@ -186,5 +219,27 @@ var MessageBar = React.createClass({ } }); -React.render(, document.getElementById('side-menu')); -React.render(, document.getElementById('chatroom')); +var socket; + +function initialiseComponents () { + socket = io("http://localhost:8000/") + .on("connect", function () { + console.log("Connected"); + }) + .on("reconnect", function () { + console.log("Reconnected"); + }) + .on("disconnect", function () { + console.log("Disconnected") + }); + + React.render(, document.getElementById('side-menu')); + React.render(, document.getElementById('chatroom')); +}; + +initialiseComponents(); + + + +}); + diff --git a/package.json b/package.json index 5fb9edd..515117f 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "scripts": { "test": "NODE_ENV=test mocha spec/", "start": "node index.js", - "compile:dev:react": "node_modules/react-tools/bin/jsx --watch --source-map-inline -x jsx lib/react/ public/js/", + "compile:dev:react": "node_modules/react-tools/bin/jsx --watch --no-cache-dir --source-map-inline -x jsx lib/react/ public/js/", "compile:react": "node_modules/react-tools/bin/jsx -x jsx lib/react/ public/js/", "dev": "nodemon index.js" }, @@ -30,7 +30,7 @@ "morgan": "~1.6.1", "node-mysql": "~0.4.2", "react-tools": "~0.13.3", - "request": "^2.60.0", + "request": "~2.60.0", "socket.io": "~1.3.5", "winston": "~1.0.1" }, diff --git a/public/js/app.js b/public/js/app.js index c9f82b0..f992cb2 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1,3 +1,7 @@ +$(function () { + +"use strict"; + var GatherCounter = React.createClass({displayName: "GatherCounter", render: function () { return ( @@ -11,6 +15,32 @@ var GatherCounter = React.createClass({displayName: "GatherCounter", } }); +var UserLogin = React.createClass({displayName: "UserLogin", + handleSubmit: function () { + + }, + render: function () { + return ( + React.createElement("form", {onSubmit: this.handleSubmit}, + React.createElement("div", {className: "input-group"}, + React.createElement("input", { + id: "btn-input", + type: "text", + className: "form-control", + placeholder: "Choose an ID..."}), + React.createElement("span", {className: "input-group-btn"}, + React.createElement("input", { + type: "submit", + className: "btn btn-primary", + id: "btn-chat", + value: "Login"}) + ) + ) + ) + ); + } +}) + var Gatherer = React.createClass({displayName: "Gatherer", render: function () { return ( @@ -39,6 +69,9 @@ var GathererMenu = React.createClass({displayName: "GathererMenu", }); return ( React.createElement("ul", {className: "nav", id: "side-menu"}, + React.createElement("li", null, + React.createElement(UserLogin, null) + ), React.createElement(GatherCounter, React.__spread({}, this.props)), gatherers ) @@ -186,7 +219,29 @@ var MessageBar = React.createClass({displayName: "MessageBar", } }); -React.render(React.createElement(GathererMenu, {count: 0, gatherers: []}), document.getElementById('side-menu')); -React.render(React.createElement(Chatroom, {history: []}), document.getElementById('chatroom')); +var socket; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmb3JtZWQuanMiLCJzb3VyY2VzIjpbbnVsbF0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLElBQUksbUNBQW1DLDZCQUFBO0NBQ3RDLE1BQU0sRUFBRSxZQUFZO0VBQ25CO0dBQ0Msb0JBQUEsSUFBRyxFQUFBLElBQUMsRUFBQTtJQUNILG9CQUFBLEdBQUUsRUFBQSxDQUFBLENBQUMsSUFBQSxFQUFJLENBQUMsR0FBSSxDQUFBLEVBQUE7S0FDWCxvQkFBQSxHQUFFLEVBQUEsQ0FBQSxDQUFDLFNBQUEsRUFBUyx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RcdFx0dHlwZT1cInRleHRcIiBcblx0XHRcdFx0XHRcdGNsYXNzTmFtZT1cImZvcm0tY29udHJvbFwiIFxuXHRcdFx0XHRcdFx0cmVmPVwiY29udGVudFwiXG5cdFx0XHRcdFx0XHRwbGFjZWhvbGRlcj1cIkJlIHBvbGl0ZSBwbGVhc2UuLi5cIiAvPlxuXHRcdFx0XHRcdDxzcGFuIGNsYXNzTmFtZT1cImlucHV0LWdyb3VwLWJ0blwiPlxuXHRcdFx0XHRcdFx0PGlucHV0IFxuXHRcdFx0XHRcdFx0XHR0eXBlPVwic3VibWl0XCIgXG5cdFx0XHRcdFx0XHRcdGNsYXNzTmFtZT1cImJ0biBidG4tcHJpbWFyeVwiIFxuXHRcdFx0XHRcdFx0XHRpZD1cImJ0bi1jaGF0XCIgXG5cdFx0XHRcdFx0XHRcdHZhbHVlPVwiU2VuZFwiIC8+XG5cdFx0XHRcdFx0PC9zcGFuPlxuXHRcdFx0XHQ8L2Rpdj5cblx0XHRcdDwvZm9ybT5cblx0XHQpO1xuXHR9XG59KTtcblxuUmVhY3QucmVuZGVyKDxHYXRoZXJlck1lbnUgY291bnQ9ezB9IGdhdGhlcmVycz17W119IC8+LCBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnc2lkZS1tZW51JykpO1xuUmVhY3QucmVuZGVyKDxDaGF0cm9vbSBoaXN0b3J5PXtbXX0vPiwgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2NoYXRyb29tJykpO1xuIl19 \ No newline at end of file +function initialiseComponents () { + socket = io("http://localhost:8000/") + .on("connect", function () { + console.log("Connected"); + }) + .on("reconnect", function () { + console.log("Reconnected"); + }) + .on("disconnect", function () { + console.log("Disconnected") + }); + + React.render(React.createElement(GathererMenu, {count: 0, gatherers: []}), document.getElementById('side-menu')); + React.render(React.createElement(Chatroom, {history: []}), document.getElementById('chatroom')); +}; + +initialiseComponents(); + + + +}); + + +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9u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tcblxuaW5pdGlhbGlzZUNvbXBvbmVudHMoKTtcblxuXG5cbn0pO1xuXG4iXX0= \ No newline at end of file diff --git a/public/js/client.js b/public/js/client.js deleted file mode 100644 index 61b1975..0000000 --- a/public/js/client.js +++ /dev/null @@ -1,13 +0,0 @@ -var socket = io("http://localhost:8000/"); - -socket.on("connect", function () { - console.log("Connected!"); -}); - -// socket.on("reconnect", function () { - -// }); - -// socket.on("disconnect", function () { - -// }); diff --git a/views/partials/foot.hbs b/views/partials/foot.hbs index 0ba0976..13d57a5 100644 --- a/views/partials/foot.hbs +++ b/views/partials/foot.hbs @@ -1,2 +1 @@ - \ No newline at end of file