Skip to content

Commit

Permalink
fixed playerlist ping color + version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
tabarra committed Apr 21, 2020
1 parent d188fd3 commit 6f1a20e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ games { 'gta5' }
author 'Tabarra'
description 'Remotely Manage & Monitor your GTA5 FiveM Server'
repository 'https://github.com/tabarra/txAdmin'
version '2.3.0'
version '2.3.1'

server_script 'starter.js'

Expand Down
8 changes: 6 additions & 2 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "2.3.0",
"changelog": "Deprecated Message. Please Update.",
"version": "2.3.1",
"changelog": "Deprecated Message. Please Update to v2.",
"allVersions": [
{
"version": "1.0.1",
Expand Down Expand Up @@ -165,6 +165,10 @@
{
"version": "2.3.0",
"changelog": "Reworked the entire monitor/restarter module."
},
{
"version": "2.3.1",
"changelog": "Fixed /status, fixed ping colors."
}
]
}
6 changes: 4 additions & 2 deletions web/public/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ function updatePlayer(player){
pingClass = 'danger';
}

el.classList.replace('list-group-item-accent-secondary', 'list-group-item-accent-' + pingClass);
el.firstElementChild.classList.replace('text-secondary', 'text-' + pingClass);
el.classList.remove('list-group-item-accent-secondary', 'list-group-item-accent-success', 'list-group-item-accent-warning', 'list-group-item-accent-danger');
el.classList.add('list-group-item-accent-' + pingClass);
el.firstElementChild.classList.remove('text-secondary', 'text-success', 'text-warning', 'text-danger');
el.firstElementChild.classList.add('text-' + pingClass);
el.firstElementChild.innerHTML = player.ping.toString().padStart(3, 'x').replace(/x/g, ' ');
el.lastElementChild.textContent = player.name;
el.dataset['pname'] = player.name.toLowerCase();
Expand Down

0 comments on commit 6f1a20e

Please sign in to comment.