highlight current approval admin row
This commit is contained in:
parent
2955d0cc95
commit
4e58f04e4e
@ -1749,8 +1749,18 @@ async function buildApprovalTableHtml(approvalTxs, getNameFunc) {
|
|||||||
// Format the transaction timestamp
|
// Format the transaction timestamp
|
||||||
const dateStr = new Date(tx.timestamp).toLocaleString()
|
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 `
|
return `
|
||||||
<tr>
|
<tr style="${rowStyle}">
|
||||||
<td style="border: 1px solid rgb(255, 255, 255); padding: 4px; color: dodgerblue">${displayName}</td>
|
<td style="border: 1px solid rgb(255, 255, 255); padding: 4px; color: dodgerblue">${displayName}</td>
|
||||||
<td style="border: 1px solid rgb(255, 254, 254); padding: 4px;">${dateStr}</td>
|
<td style="border: 1px solid rgb(255, 254, 254); padding: 4px;">${dateStr}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user