mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 12:09:21 +00:00
Determine whether user is signed in or not on sidebar
This commit is contained in:
parent
18f7fbc304
commit
30743601a9
@ -226,8 +226,14 @@ ComunicWeb.components.sideBar.main = {
|
||||
onclick: (e) => e.stopImmediatePropagation()
|
||||
});
|
||||
|
||||
if(friend.accepted == 1)
|
||||
subInfoEl.innerHTML = timeDiffToStr(friend.time_last_activity);
|
||||
// Check if friendship request has been accepted or not
|
||||
if(friend.accepted == 1) {
|
||||
if(ComunicWeb.common.date.time() - friend.time_last_activity < 30)
|
||||
subInfoEl.innerHTML = "<span style='color: green;'>Online</span>";
|
||||
else
|
||||
subInfoEl.innerHTML = timeDiffToStr(friend.time_last_activity);
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
const respondRequest = function(accept) {
|
||||
|
Loading…
Reference in New Issue
Block a user