From eaa908336dd8111334f05aa44e1be1e540cccd28 Mon Sep 17 00:00:00 2001 From: oOHiyoriOo Date: Sat, 13 Jun 2026 18:51:57 +0200 Subject: [PATCH] fix: player info 3-col grid layout + add Kick/Ban actions - Wrapped col-sm-4 fields in proper row/col hierarchy (removed conflicting col+row on same element, now col-lg-12 > row > col-sm-4) - Replaced d-grid Steam Profile button with btn-group containing Steam Profile, Kick (confirm dialog), and Ban (prompt for reason) - Removed redundant 'Info' heading Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- js/pages/playerInfo.js | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/js/pages/playerInfo.js b/js/pages/playerInfo.js index 9347542..fcd26b7 100644 --- a/js/pages/playerInfo.js +++ b/js/pages/playerInfo.js @@ -12,17 +12,20 @@ function PlayerInfoPage(params, container) { 'Player: ' + userid + '' + '' + '' + - '
' + + '
' + '' + ' Steam Profile' + '' + + '' + + '' + '
' + '
' + '
' + - '

Info

' + '' + '
' + - '
Loading…
' + + '
' + + '
Loading…
' + + '
' + '' + ''; container.innerHTML = html; @@ -65,6 +68,19 @@ function PlayerInfoPage(params, container) { document.getElementById('pi-refresh').addEventListener('click', refresh); + document.getElementById('pi-kick').addEventListener('click', function () { + if (confirm('Kick player ' + (document.getElementById('pi-username').textContent) + '?')) { + Rcon.command('kick ' + userid); + } + }); + + document.getElementById('pi-ban').addEventListener('click', function () { + var reason = prompt('Ban reason:', ''); + if (reason !== null) { + Rcon.command('ban ' + userid + ' ' + (reason || 'No reason')); + } + }); + if (Rcon.isConnected()) refresh(); else { var _c = function () { refresh(); Rcon.off('connected', _c); }; Rcon.on('connected', _c); } }