From 05fc111e65c93cc8f33051f0c0a8084a5c5debf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Pu=C5=A1nik?= Date: Mon, 12 Oct 2015 14:26:40 +0200 Subject: profile page --- js/codeq/login.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'js') 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(''); } }); -- cgit v1.2.1