fix: history rows show the ISO datetime and the age (closes #760)
Home, AddressDetail and AddressToken showed only the relative age, with the datetime as a tooltip. Each row now shows the datetime and then the age in parentheses, on a line of its own, through transactionTimeHtml() in helpers.js, which TransactionDetail also uses. The direction label moves to its own right-aligned line below. Model: opus-5-5
This commit is contained in:
1 parent
d909567ab9
commit
1a21bd254c
8 files changed
+199
-90
No files matched your search
@@ -12,8 +12,7 @@ const {
|
||||
attachCopyHandlers,
|
||||
goBack,
|
||||
pushCurrentView,
|
||||
isoDate,
|
||||
timeAgo,
|
||||
transactionTimeHtml,
|
||||
} = require("./helpers");
|
||||
const { state, saveState, currentNetwork } = require("../../shared/state");
|
||||
const { formatAddressTotal, getAddressValue } = require("../../shared/prices");
|
||||
@@ -236,10 +235,11 @@ function renderTransactions(txs) {
|
||||
const nameStr = escapeHtml(title || ensName || "");
|
||||
const err = tx.isError ? " (failed)" : "";
|
||||
const opacity = tx.isError ? " opacity-50" : "";
|
||||
const ago = escapeHtml(timeAgo(tx.timestamp));
|
||||
const iso = escapeHtml(isoDate(tx.timestamp));
|
||||
html += `<div class="tx-row py-2 border-b border-border-light text-xs cursor-pointer hover:bg-hover${opacity}" data-tx="${i}">`;
|
||||
html += `<div class="flex justify-between"><span class="text-muted" title="${iso}">${ago}</span><span>${dirLabel}${err}</span></div>`;
|
||||
// The time has a line of its own, so a long time or direction label
|
||||
// never pushes the other onto a second line.
|
||||
html += `<div class="text-muted">${transactionTimeHtml(tx.timestamp)}</div>`;
|
||||
html += `<div class="text-right">${dirLabel}${err}</div>`;
|
||||
html += txCounterpartyHtml(counterparty, nameStr, amountStr);
|
||||
html += `</div>`;
|
||||
i++;
|
||||
|
||||
Reference in new issue
Block a user