fix: remove click-to-copy from timestamps in list views
All checks were successful
check / check (push) Successful in 22s

List view rows (home, addressDetail, addressToken) should only be clickable
as a whole to navigate to the detail view. Click-to-copy on individual
elements belongs only in the transaction detail view.

Reverts timestamp click-to-copy changes in list views per review feedback.
Keeps blockNumberHtml() and detail-view timestamp changes.
This commit is contained in:
user
2026-02-28 15:21:13 -08:00
parent 3005813f2c
commit 811c125cb9
3 changed files with 3 additions and 24 deletions

View File

@@ -216,19 +216,12 @@ function renderTransactions(txs) {
const ago = escapeHtml(timeAgo(tx.timestamp)); const ago = escapeHtml(timeAgo(tx.timestamp));
const iso = escapeHtml(isoDate(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" data-tx="${i}" style="${opacity}">`; html += `<div class="tx-row py-2 border-b border-border-light text-xs cursor-pointer hover:bg-hover" data-tx="${i}" style="${opacity}">`;
html += `<div class="flex justify-between"><span class="text-muted underline decoration-dashed cursor-pointer" title="${iso}" data-copy="${iso}">${ago}</span><span>${dirLabel}${err}</span></div>`; html += `<div class="flex justify-between"><span class="text-muted" title="${iso}">${ago}</span><span>${dirLabel}${err}</span></div>`;
html += `<div class="flex justify-between"><span class="flex items-center">${dot}${addrStr}</span><span>${amountStr}</span></div>`; html += `<div class="flex justify-between"><span class="flex items-center">${dot}${addrStr}</span><span>${amountStr}</span></div>`;
html += `</div>`; html += `</div>`;
i++; i++;
} }
list.innerHTML = html; list.innerHTML = html;
list.querySelectorAll("[data-copy]").forEach((el) => {
el.addEventListener("click", (e) => {
e.stopPropagation();
navigator.clipboard.writeText(el.dataset.copy);
showFlash("Copied!");
});
});
list.querySelectorAll(".tx-row").forEach((row) => { list.querySelectorAll(".tx-row").forEach((row) => {
row.addEventListener("click", () => { row.addEventListener("click", () => {
const idx = parseInt(row.dataset.tx, 10); const idx = parseInt(row.dataset.tx, 10);

View File

@@ -293,19 +293,12 @@ function renderTransactions(txs) {
const ago = escapeHtml(timeAgo(tx.timestamp)); const ago = escapeHtml(timeAgo(tx.timestamp));
const iso = escapeHtml(isoDate(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" data-tx="${i}" style="${opacity}">`; html += `<div class="tx-row py-2 border-b border-border-light text-xs cursor-pointer hover:bg-hover" data-tx="${i}" style="${opacity}">`;
html += `<div class="flex justify-between"><span class="text-muted underline decoration-dashed cursor-pointer" title="${iso}" data-copy="${iso}">${ago}</span><span>${dirLabel}${err}</span></div>`; html += `<div class="flex justify-between"><span class="text-muted" title="${iso}">${ago}</span><span>${dirLabel}${err}</span></div>`;
html += `<div class="flex justify-between"><span class="flex items-center">${dot}${addrStr}</span><span>${amountStr}</span></div>`; html += `<div class="flex justify-between"><span class="flex items-center">${dot}${addrStr}</span><span>${amountStr}</span></div>`;
html += `</div>`; html += `</div>`;
i++; i++;
} }
list.innerHTML = html; list.innerHTML = html;
list.querySelectorAll("[data-copy]").forEach((el) => {
el.addEventListener("click", (e) => {
e.stopPropagation();
navigator.clipboard.writeText(el.dataset.copy);
showFlash("Copied!");
});
});
list.querySelectorAll(".tx-row").forEach((row) => { list.querySelectorAll(".tx-row").forEach((row) => {
row.addEventListener("click", () => { row.addEventListener("click", () => {
const idx = parseInt(row.dataset.tx, 10); const idx = parseInt(row.dataset.tx, 10);

View File

@@ -130,19 +130,12 @@ function renderHomeTxList(ctx) {
const ago = escapeHtml(timeAgo(tx.timestamp)); const ago = escapeHtml(timeAgo(tx.timestamp));
const iso = escapeHtml(isoDate(tx.timestamp)); const iso = escapeHtml(isoDate(tx.timestamp));
html += `<div class="home-tx-row py-2 border-b border-border-light text-xs cursor-pointer hover:bg-hover" data-tx="${i}" style="${opacity}">`; html += `<div class="home-tx-row py-2 border-b border-border-light text-xs cursor-pointer hover:bg-hover" data-tx="${i}" style="${opacity}">`;
html += `<div class="flex justify-between"><span class="text-muted underline decoration-dashed cursor-pointer" title="${iso}" data-copy="${iso}">${ago}</span><span>${dirLabel}${err}</span></div>`; html += `<div class="flex justify-between"><span class="text-muted" title="${iso}">${ago}</span><span>${dirLabel}${err}</span></div>`;
html += `<div class="flex justify-between"><span class="flex items-center">${dot}${addrStr}</span><span>${amountStr}</span></div>`; html += `<div class="flex justify-between"><span class="flex items-center">${dot}${addrStr}</span><span>${amountStr}</span></div>`;
html += `</div>`; html += `</div>`;
i++; i++;
} }
list.innerHTML = html; list.innerHTML = html;
list.querySelectorAll("[data-copy]").forEach((el) => {
el.addEventListener("click", (e) => {
e.stopPropagation();
navigator.clipboard.writeText(el.dataset.copy);
showFlash("Copied!");
});
});
list.querySelectorAll(".home-tx-row").forEach((row) => { list.querySelectorAll(".home-tx-row").forEach((row) => {
row.addEventListener("click", () => { row.addEventListener("click", () => {
const idx = parseInt(row.dataset.tx, 10); const idx = parseInt(row.dataset.tx, 10);