summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorMarko Pušnik <marko.pusnik@guru.si>2015-10-12 14:26:40 +0200
committerMarko Pušnik <marko.pusnik@guru.si>2015-10-12 14:26:40 +0200
commit05fc111e65c93cc8f33051f0c0a8084a5c5debf1 (patch)
treea24f225102ab22eda0b427316b6e250f2f26df79 /js
parent894df8afb3c70f2b17437d10d43a7b62402f59c3 (diff)
profile page
Diffstat (limited to 'js')
-rw-r--r--js/codeq/login.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/js/codeq/login.js b/js/codeq/login.js
index 538cd3d..0feaf01 100644
--- a/js/codeq/login.js
+++ b/js/codeq/login.js
@@ -15,8 +15,13 @@
$('#disabled').css('cursor', '');
if (data.code !== 0) throw new Error('Login failed, code: ' + data.code + ', message: ' + data.message);
- //merge profile
+ //nav signed in...
+ $('#signed-in-title').html('Signed in as '+(data.name||$('#username').val()));
+ //merge with profile page
$('#profileUsername').html($('#username').val());
+ $('#profileName').html(data.name||'undefined');
+ $('#profileJoined').html(new Date(data.joined).toLocaleString());
+ $('#profileLastLogin').html(new Date(data["last-login"]).toLocaleString());
//merge these settings into the already existing default settings
var sett = data.settings;
@@ -58,7 +63,6 @@
formInputs.off('keyup');
$('#modalLogIn').modal('hide');
//$("#screen_login").css('display', 'none');
- $('#signed-in-title').html('Signed in as '+$('#username').val());
$("#password").val('');
}
});