feat: players page redesign — deltas, KPI tiles, sparklines, expanded row #9
@@ -3,14 +3,11 @@ let pendingPlayerData = null;
|
||||
let openPdgaNumber = null;
|
||||
|
||||
// ── Delta-pill helper ─────────────────────────────
|
||||
// Returns { text, cls, html } — use .text/.cls to update existing DOM elements
|
||||
// safely; .html is available for insertion contexts.
|
||||
function renderDeltaPill(value, extraClass) {
|
||||
if (value == null) return null;
|
||||
const cls = value > 0 ? 'up' : value < 0 ? 'down' : 'flat';
|
||||
const text = value > 0 ? '+' + value : String(value);
|
||||
const extra = extraClass ? ' ' + extraClass : '';
|
||||
return { text, cls, html: `<span class="delta-pill ${cls}${extra}">${text}</span>` };
|
||||
return { text, cls };
|
||||
}
|
||||
|
||||
function setupTooltipsAfterSwap() {
|
||||
|
||||
Reference in New Issue
Block a user