diff --git a/inc/myco.js b/inc/myco.js index 7206271..2b1a5f9 100644 --- a/inc/myco.js +++ b/inc/myco.js @@ -553,6 +553,7 @@ on_valid_login_modal=function(e) { 'email': email, 'password': pass, 'server': server, + 'lastsync': null }); pleaseWaitHide(); logged_menu(); @@ -628,6 +629,8 @@ on_click_sync_btn=function(e) { if (data.groups) { groups.import(data.groups); groups.save(); + user.lastsync=new Date().getTime(); + localStorage.user=JSON.stringify(user); refresh_group_list(); pleaseWaitHide(); view_home(); @@ -691,6 +694,12 @@ on_click_myaccount_btn=function() { $('#myaccount_modal #myaccount_email').html(user.email); $('#myaccount_modal #myaccount_name')[0].value=user.name; $('#myaccount_modal #myaccount_server').html(user.server); + if (user.lastsync) { + $('#myaccount_modal #myaccount_lastsync').html(moment(user.lastsync).format('DD/MM/YYYY HH:mm:ss')); + } + else { + $('#myaccount_modal #myaccount_lastsync').html('Jamais synchronisé'); + } $('#myaccount_modal').modal('show'); } diff --git a/index.html b/index.html index 6a63372..cf49019 100644 --- a/index.html +++ b/index.html @@ -483,30 +483,35 @@ body{