diff --git a/public/admin.html b/public/admin.html index 2c11465..b05ef1c 100644 --- a/public/admin.html +++ b/public/admin.html @@ -33,7 +33,9 @@ section.tab { display:none; } section.tab.active { display:block; } + #players-wrap { overflow-x:auto; } table { width:100%; border-collapse:collapse; font-size:14px; } + #players-wrap table { min-width:820px; } th, td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--border); vertical-align:top; } th { color:var(--muted); font-weight:600; } .chips { display:flex; flex-wrap:wrap; gap:4px; } diff --git a/public/js/admin.js b/public/js/admin.js index aa240ec..2cd026e 100644 --- a/public/js/admin.js +++ b/public/js/admin.js @@ -66,12 +66,11 @@ async function loadPlayers() { const rows = players.map((p) => { const banned = bans.has(String(p.name).toLowerCase()); - const chips = (arr) => (arr || []).map((x) => ``).join(''); const tr = document.createElement('tr'); tr.innerHTML = `${banned ? ' gebannt' : ''}` + `${p.bestScore}${p.games}${fmt(p.lastAt)}` + - `` + + `
` + ``; tr.querySelector('.pname').textContent = p.name; // XSS-safe const fill = (sel, arr) => { const c = tr.querySelector(sel); (arr || []).forEach((x) => { const s = document.createElement('span'); s.className = 'chip'; s.textContent = x; c.appendChild(s); }); };