mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Friendbar show latest login of users
This commit is contained in:
parent
6a1f441da6
commit
a37b93e96a
@ -116,8 +116,6 @@ ComunicWeb.components.friends.bar = {
|
||||
|
||||
//Add user login status
|
||||
var statusRow = createElem("td", friendRow);
|
||||
var iconsStats = createElem("i", statusRow);
|
||||
iconsStats.className = "fa fa-fw fa-circle";
|
||||
|
||||
//Check if user is online or not
|
||||
var currentTime = ComunicWeb.common.date.time();
|
||||
@ -125,11 +123,14 @@ ComunicWeb.components.friends.bar = {
|
||||
|
||||
if(timeDifference < 30){
|
||||
//User is logged in
|
||||
var iconsStats = createElem("i", statusRow);
|
||||
iconsStats.className = "fa fa-fw fa-circle";
|
||||
iconsStats.style.color = "green";
|
||||
}
|
||||
else {
|
||||
//User isn't logged in
|
||||
statusRow.innerHTML = ComunicWeb.common.date.diffToStr();
|
||||
var logoutTime = createElem("small", statusRow);
|
||||
logoutTime.innerHTML = ComunicWeb.common.date.diffToStr(timeDifference);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user