|
|
@ -1,10 +1,14 @@
|
|
|
|
var socket,
|
|
|
|
var socket,
|
|
|
|
config,
|
|
|
|
config,
|
|
|
|
app = {};
|
|
|
|
app = {
|
|
|
|
|
|
|
|
'username': null,
|
|
|
|
|
|
|
|
'uid': null
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
(function () {
|
|
|
|
var showWelcomeMessage = false;
|
|
|
|
var showWelcomeMessage = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.loadConfig = function() {
|
|
|
|
app.loadConfig = function() {
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
@ -24,6 +28,8 @@ var socket,
|
|
|
|
|
|
|
|
|
|
|
|
socket.on('event:connect', function (data) {
|
|
|
|
socket.on('event:connect', function (data) {
|
|
|
|
app.username = data.username;
|
|
|
|
app.username = data.username;
|
|
|
|
|
|
|
|
app.uid = data.uid;
|
|
|
|
|
|
|
|
|
|
|
|
app.showLoginMessage();
|
|
|
|
app.showLoginMessage();
|
|
|
|
socket.emit('api:updateHeader', {
|
|
|
|
socket.emit('api:updateHeader', {
|
|
|
|
fields: ['username', 'picture', 'userslug']
|
|
|
|
fields: ['username', 'picture', 'userslug']
|
|
|
|