Sometimes git smoke something illicit. Fixed.

This commit is contained in:
Jean-Baptiste Pasquier 2019-06-05 11:46:32 +00:00
commit 54c8dda717

View File

@ -35,5 +35,15 @@ document.addEventListener('DOMContentLoaded', function (event) {
});
});
//- Header login hide/show
if(document.querySelector('sib-auth').getUser() !== null) {
document.querySelector('button[role="log in"]').style.display = 'none';
//- Token expired, hack for ask relogin
if(new Date(document.querySelector('sib-auth').getUser().expires_at*1000) <= new Date()) {
document.querySelector('button[role="log in"]').style.display = '';
document.querySelector('button[role="log in"]').style.color = 'red';
document.querySelector('button[role="log in"]').innerHTML = 'Re-login';
}
}
});