show namecolor in online listing

master
Aevann 2023-01-27 20:15:38 +02:00
parent 1e1f78116d
commit 159773cf73
2 changed files with 5 additions and 4 deletions

View File

@ -204,7 +204,7 @@ socket.on('online', function(data){
online += `<li>`
if (admin_level && Object.keys(data[1]).includes(u[0].toLowerCase()))
online += '<b class="text-danger muted" data-bs-toggle="tooltip" title="Muted">X</b> '
online += `<a href="/@${u[0]}"><img loading="lazy" class="avatar-pic pp20 mr-1" src="/pp/${u[1]}">${u[0]}</a></li>`
online += `<a class="font-weight-bold" target="_blank" href="/@${u[0]}" style="color:#${u[2]}"><img loading="lazy" class="mr-1" src="/pp/${u[1]}">${u[0]}</a></li>`
online2 += `<br>@${u[0]}`
}
document.getElementById('online').innerHTML = online

View File

@ -163,9 +163,10 @@ def connect(v):
join_room(request.referrer)
if [v.username, v.id] not in online:
online.append([v.username, v.id])
refresh_online()
if [v.username, v.id, v.name_color] not in online:
online.append([v.username, v.id, v.name_color])
refresh_online()
emit('typing', typing[request.referrer], room=request.referrer)
return '', 204