From 4e58f04e4e98663321b7d59aba47fc3e2b63cbf8 Mon Sep 17 00:00:00 2001 From: QuickMythril Date: Tue, 28 Jan 2025 04:33:43 -0500 Subject: [PATCH] highlight current approval admin row --- assets/js/MinterBoard.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/assets/js/MinterBoard.js b/assets/js/MinterBoard.js index 184baff..a84389f 100644 --- a/assets/js/MinterBoard.js +++ b/assets/js/MinterBoard.js @@ -1749,8 +1749,18 @@ async function buildApprovalTableHtml(approvalTxs, getNameFunc) { // Format the transaction timestamp const dateStr = new Date(tx.timestamp).toLocaleString() + // Check whether this is the current user + const isCurrentUser = + userState && + userState.accountName && + adminName && + adminName.toLowerCase() === userState.accountName.toLowerCase(); + // If it's the current user, highlight the row (change to any color/style you prefer) + const rowStyle = isCurrentUser + ? "background: rgba(178, 255, 89, 0.2);" // light green highlight + : ""; return ` - + ${displayName} ${dateStr}