From 833cfd2459aa8d668b787a421414dd5376bb7882 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 16 Jun 2026 01:41:50 -0700 Subject: Tidy tx details layout on mobile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the key/value rows wrapping awkwardly on narrow screens (right-align + wrap-safe values, fixed-width key). Drop the redundant "When: Unconfirmed…" line; pending now shows a single "Status: Pending (in mempool)". Confirmed txs show Status / Block / Date. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app.js | 9 ++++----- src/style.css | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/app.js b/src/app.js index c5a9836..9afaf27 100644 --- a/src/app.js +++ b/src/app.js @@ -1048,9 +1048,6 @@ function historyTab() { function txDetailView(t) { const incoming = t.net >= 0; - const when = t.confirmed && t.blockTime - ? new Date(t.blockTime * 1000).toLocaleString() + ' · ' + timeAgo(t.blockTime) - : 'Unconfirmed — waiting to be mined'; const line = (k, v) => h('div', { class: 'line' }, h('span', { class: 'k' }, k), h('span', { class: 'v' }, v)); return h( 'div', @@ -1064,8 +1061,9 @@ function txDetailView(t) { ' ', unitTag('unit') ), h('div', { class: 'summary col', style: 'gap:0' }, - line('Status', t.confirmed ? `Confirmed (block ${t.blockHeight || '—'})` : 'In mempool'), - line('When', when), + line('Status', t.confirmed ? 'Confirmed' : 'Pending (in mempool)'), + t.confirmed ? line('Block', String(t.blockHeight || '—')) : null, + t.confirmed && t.blockTime ? line('Date', new Date(t.blockTime * 1000).toLocaleString()) : null, !incoming && t.fee ? line('Network fee', fmtAmount(t.fee) + ' ' + unitLabel()) : null ), h('div', { class: 'col gap6' }, @@ -1128,3 +1126,4 @@ if (!restoreSession()) render(); + diff --git a/src/style.css b/src/style.css index ed1d542..dce2d88 100644 --- a/src/style.css +++ b/src/style.css @@ -185,9 +185,9 @@ textarea { resize: vertical; min-height: 84px; font-family: var(--mono); font-si /* ---- review / summary ---- */ .summary { background: #f7f8fa; border: 1px solid var(--line); border-radius: 12px; padding: 14px; } -.summary .line { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; } -.summary .line .k { color: var(--muted); } -.summary .line .v { font-family: var(--mono); } +.summary .line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px; align-items: baseline; } +.summary .line .k { color: var(--muted); flex: none; } +.summary .line .v { font-family: var(--mono); text-align: right; min-width: 0; word-break: break-word; } /* ---- misc ---- */ .notice { border-radius: 11px; padding: 11px 13px; font-size: 14px; } -- cgit v1.2.3