mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix banned players formatting
This commit is contained in:
parent
9cb3b6829d
commit
be5183260e
@ -232,7 +232,7 @@
|
||||
let players = server.players_cache;
|
||||
for(let i=0; i < players.length; i++){
|
||||
text += `<tr id="playerItem-${ players[i]["name"] }" class="playerItem--" style="text-align: center;">`;
|
||||
text += `<td style="overflow: scroll;"><strong>${players[i]["name"]}</strong></td>`;
|
||||
text += `<td class="no-scroll" style="overflow: scroll;"><strong>${players[i]["name"]}</strong></td>`;
|
||||
if(players[i]["status"] === "Online"){
|
||||
text += `<td><span class="text-success"><i class="fas fa-signal"></i> ${ players[i]['status'] }</span></td>`
|
||||
}else{
|
||||
@ -241,7 +241,7 @@
|
||||
if(server["running"]){
|
||||
text += `<td><button onclick="send_command_to_server('ban ${ players[i]['name'] }')" type="button" class="btn btn-danger controls">Ban</button><br class="mobile-break"><button onclick="send_command_to_server('kick ${ players[i]['name'] }')" type="button" class="btn btn-outline-danger controls">Kick</button><br><button onclick="send_command_to_server('op ${ players[i]['name'] }')" type="button" class="btn btn-warning controls">OP</button><br class="mobile-break"><button onclick="send_command_to_server('deop ${ players[i]['name'] }')" type="button" class="btn btn-outline-warning controls">De-OP</button></td>`
|
||||
}else{
|
||||
text += `<td><span> Unavailable (Server Offline)</span></td>`
|
||||
text += `<td><span> Unavailable<br> (Server Offline)</span></td>`
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
<br class="mobile-break"/>
|
||||
<button onclick="send_command_to_server(`deop {{ player['name'] }}`)" type="button" class="btn btn-outline-warning controls">De-OP</button>
|
||||
{% else %}
|
||||
<span> Unavailable (Server Offline)</span>
|
||||
<span> Unavailable <br>(Server Offline)</span>
|
||||
{% end %}
|
||||
</td>
|
||||
</tr>
|
||||
@ -51,9 +51,9 @@
|
||||
width: 70px;
|
||||
}
|
||||
</style>
|
||||
<div class="col-xl-6 col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="col-xl-6 col-lg-12 col-md-12 col-sm-12 no-scroll" width="100%">
|
||||
<h2>{{ translate('serverPlayerManagement', 'bannedPlayers', data['lang']) }}:</h2>
|
||||
<table class="table table-sm-responsive">
|
||||
<table class="table table-sm-responsive d-none d-lg-block no-scroll" style="width: 100%;">
|
||||
<thead class="thead">
|
||||
<tr>
|
||||
<th scope="col">Player</th>
|
||||
@ -75,4 +75,22 @@
|
||||
{% end %}
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-sm-responsive d-block d-lg-none" style="width: 100%;">
|
||||
<thead class="thead ">
|
||||
<tr>
|
||||
<th scope="col">Player</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for player in data['banned_players'] %}
|
||||
<tr id="playerItem-{{ player }}" class="playerItem--">
|
||||
<td><strong> {{ player['name'] }}</strong></td>
|
||||
<td class="buttons">
|
||||
<button onclick="send_command_to_server(`pardon {{ player['name'] }} `)" type="button" class="btn btn-danger">Unban</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% end %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user