Closed macluo closed 9 years ago
If we wanted to we could get into jQuery UI dialogs, which are modal in-pane things. I know I mentioned them before but I never got around to demo'ing them.
I think it is a good idea. We can also make jQuery UI to display the final winning popup too.
I'll claim this for now and get some jQuery UI stuff into the mix. I don't know how much I'll be able to complete today but anyone else can claim it and continue work on it.
Almost finished this feature in d9f2393ab3626d4a98beab5081d904e089f465b8 I think, just needs some additional logic to change something in the UI to indicate the user is logged in, and a logout button. Going to move onto doing some stuff with #51 if anyone wants to pick up where I left off.
I can pick up what you left off if you do not plan to work on it tonight.
I don't think I'll be working on anything more tonight, feel free to go ahead.
Just added user login status and logout button 9f4a4ef625b3d110351abcdebe39da76a95d3811
Designer button is now available on the game menu caa54754484cc4993b534532a2e8c74d40e387c7. The designer is missing the background color. There might be a bug.
Fixed that, it was a problem with me forgetting to add the mazeui css class to things in the designer (had to do stuff with css to fix a problem with the jQueryUI css interfering). Looks really good!
I played with this a bit today, haven't broken it yet (but maybe I'm just a bad tester).
Another question: How can we do session control between mazeMenu and designer pages? Should we use local storage or is there a way to keep javascript file running/stored locally?
Should be able to use a cookie for it to make it easy: http://stackoverflow.com/questions/1458724/how-to-set-unset-cookie-with-jquery
Thanks. That helps. What is the error response text when posting to /keepalive fails? Because I only see 'true' in the server.js.
If you don't have a token or the token is expired, it'll be {"response":"unauthorized token"}, the only time when keepalive would fail is when your token is not valid (expired or not even there or not a valid token), so that's why there's only those two responses.
I see. Thanks. Just added session control to mazeMenu 75e32372c5a09bca05036a01932defd65cb535d0
this.sessionHandler = setInterval(function() {
this.HTTPPostAsync("/keepalive", function(e) {
if (e.response == "unauthorized token") {
this.logout();
}
});
}, this.sessionTimeout*60*1000);
Haven't tested it yet because it will take about 20 mins. lol
Sounds good, that will be useful for long play sessions.
I am done with this task for now and leave it to anyone who likes to continue refining it. One thing I can foresee that is tough to do next would be to get the new jQuery UI in mazeMenu.js to pass the mocha test.
I guess pending more tests, this is done? I'll close it, make a new issue if there's anything that needs to be done as far as testing.
should this be a HTML5 canvas pop-up or part of game menu?