Skip to content
This repository has been archived by the owner on Jan 1, 2019. It is now read-only.

Commit

Permalink
Merge pull request #96 from Rylius/development
Browse files Browse the repository at this point in the history
1.0.3 merge
  • Loading branch information
Rylius committed Aug 12, 2014
2 parents ec90edd + e74f3ec commit 22c2d7f
Show file tree
Hide file tree
Showing 26 changed files with 494 additions and 222 deletions.
5 changes: 5 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ module.exports = function (grunt) {
files: {
"dist/styles/luna.css": "public/styles/themes/luna/luna.less"
}
},
flufflepuff: {
files: {
"dist/styles/flufflepuff.css": "public/styles/themes/flufflepuff/flufflepuff.less"
}
}
},
concat: {
Expand Down
9 changes: 7 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ hbs.handlebars.registerPartial('derp2', fs.readFileSync(__dirname + '/views/util
hbs.handlebars.registerPartial('globalChat', fs.readFileSync(__dirname + '/views/chat/chat.hbs', 'utf8'));
hbs.handlebars.registerPartial('chatMessage', fs.readFileSync(__dirname + '/views/chat/message.hbs', 'utf8'));

hbs.handlebars.registerPartial('cookieNotice', fs.readFileSync(__dirname + '/views/util/cookie_notice.hbs', 'utf8'));

hbs.handlebars.registerPartial('watermarkIcon', fs.readFileSync(__dirname + '/views/util/watermark_icon.hbs', 'utf8'));

require('./lib/helpers/input')(hbs);
Expand Down Expand Up @@ -115,7 +117,9 @@ app.use(function (req, res, next) {
});

var ajaxAuth = function (req, res, next) {
if (req.path != '/ajax/user/login' && req.path.indexOf('/ajax/') == 0 && !req.session.user) {
if (req.path != '/ajax/user/login'
&& req.path != '/ajax/game/list'
&& req.path.indexOf('/ajax/') == 0 && !req.session.user) {
res.send(403);
return;
}
Expand All @@ -125,8 +129,9 @@ var ajaxAuth = function (req, res, next) {

var auth = function (req, res, next) {
if (!req.session.user
&& !_.contains(['/', '/user/login', '/ajax/user/login'], req.path)
&& !_.contains(['/', '/user/login', '/ajax/user/login', '/ajax/game/list'], req.path)
&& !(/^\/info\/.+/.test(req.path) && req.method == 'GET')
&& !(/^\/games/.test(req.path) && req.method == 'GET')
&& !(/^\/game\/join\/\d+/.test(req.path) && req.method == 'GET')
&& !(/^\/game\/lobby\/\d+/.test(req.path) && req.method == 'GET')
&& !(/^\/game\/play\/\d+/.test(req.path) && req.method == 'GET')) {
Expand Down
12 changes: 12 additions & 0 deletions changes.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
[
{
"date": "Aug 12, 2014",
"version": "1.0.3",
"changes": [
"Replaced chat input method, should fix issues on mobile devices",
"Added Fluffle Puff theme!",
"Added maximum number of hosted games per player (2 for now). You can still join as many games as you like",
"Added pointless European cookie notice",
"Game list no longer requires a login",
"Hid password field on login"
]
},
{
"date": "Feb 24, 2014",
"version": "1.0.2",
Expand Down
6 changes: 6 additions & 0 deletions config.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

"settings": {
"maxGames": 200,
"maxGamesPerUser": 2,
"allowNewGames": true
},

Expand All @@ -31,6 +32,11 @@
"name": "Luna",
"id": "luna",
"file": "luna"
},
{
"name": "Fluffle Puff",
"id": "flufflepuff",
"file": "flufflepuff"
}
],
"defaultTheme": "derpy",
Expand Down
Loading

0 comments on commit 22c2d7f

Please sign in to comment.