Commit Graph

4620 Commits

Author SHA1 Message Date
lemon 3ebf0a29b5 Explain profile wallet payment type 2026-05-27 23:57:35 -07:00
lemon e6acb04398 Use user icon for profile wallet fallback 2026-05-27 23:57:35 -07:00
lemon 8d5cd78b04 Add common profile translation 2026-05-27 23:57:35 -07:00
lemon 0b4454a4c2 Add profile wallet option for campaigns 2026-05-27 23:57:35 -07:00
lemon ffb1677fa2 Move campaign goal note into tooltip 2026-05-27 23:57:35 -07:00
filemon 31d76a8c4b Fix raw i18n key shown for campaign engagement counters
The Trans component's values={{ count: formatNumber(N) }} was spreading
after the numeric count prop, overriding it with a string.  i18next v26
requires a numeric count for plural resolution — a string causes it to
return the raw key path (e.g. 'campaignsDetail.repost') instead of the
resolved plural form.

Rename the interpolation variable from count to formattedCount so it no
longer collides with the count prop that Trans uses for plural selection.
Update all 16 locale files to use {{formattedCount}} in the repost, quote,
and like translation strings.

Regression-of: 86a084f3
2026-05-27 23:57:35 -07:00
lemon c69275e794 Hide empty campaign story section 2026-05-27 23:57:35 -07:00
lemon f79046694a Render campaign story in previews 2026-05-27 23:57:35 -07:00
lemon 1839c2e697 Remove campaign summary field 2026-05-27 23:57:35 -07:00
lemon 400671529f Fallback to profile images for campaign previews 2026-05-27 22:20:39 -07:00
lemon cc9ff7676a Fallback to profile images for campaign covers 2026-05-27 22:18:27 -07:00
Chad Curtis 7db479bb73 Wire VITE_PLAUSIBLE_DOMAIN and VITE_PLAUSIBLE_ENDPOINT into deploy-web 2026-05-27 03:05:35 -05:00
mkfain d4670119d5 Point FollowQRDialog at /:nip19 instead of dead /follow route
When FollowPage was removed in the unreachable-page cleanup, the
QR code on the profile kept encoding `${origin}/follow/<npub-or-nip05>`,
which falls through to NotFound because there is no `/follow/...`
route. Encode the bare identifier instead — Agora's universal
NIP-19 dispatcher at /:nip19 already resolves both npub and
`user@domain.com` to ProfilePage.

Regression-of: b975e557
2026-05-26 22:30:49 -05:00
mkfain 6e3bc2d3d1 Seed campaign wallet picker to Agora wallet on first render
The Create Campaign page initialised `walletSource` to `'custom'` and
relied on a post-mount effect to flip it to `'mine'` once
`hdWalletAvailable` became true. With Radix Select's controlled value
that left users staring at the "Choose a wallet" placeholder on the
initial paint and forced them to open the dropdown to see that their
Agora wallet was even an option.

Seed both `walletSource` and `mineAccept` lazily from the
synchronously-available HD-wallet availability so the trigger already
reads as the user's Agora wallet on first render. The existing
availability-change effects still cover the (rare) case where the hook
resolves a tick later or where the wallet disappears mid-session.
2026-05-26 22:16:15 -05:00
mkfain 92d003eac0 Add 'Pay with Agora' button on campaign detail page
Opens the HD wallet's send dialog prefilled with the campaign's on-chain
address — same flow used at /wallet, so donors don't have to learn a
second send UI. Sits above 'Open external wallet' inside the donate
panel; the external button downgrades to the secondary variant when
both are present so only one orange CTA stacks.

When the campaign declares both an on-chain (bc1…) and a silent payment
(sp1…) endpoint, a swap link appears under the privacy disclaimer so
donors can flip to SP without leaving the modal. The toggle hides
itself if the donor manually edits the recipient field, so we never
trash their typed input.

Gated on useHdWalletAccess (nsec logins only) — extension and bunker
logins fall through to the external-wallet QR. The button is also
hidden for SP-only campaigns (no on-chain address to prefill) and for
the campaign owner themselves.
2026-05-26 21:59:36 -05:00
Alex Gleason f329915e88 Merge branch 'style/lemon-wallet' into 'main'
Style/lemon wallet

See merge request soapbox-pub/agora!35
2026-05-27 02:26:00 +00:00
Chad Curtis f173b975b7 Add Kosovo and Western Sahara, surface Tibet in country pickers
Add Kosovo (XK) and Western Sahara (EH) to the country list. Kosovo
has no Unicode emoji flag, so it follows the Tibet pattern with a
bundled SVG asset that CountryFlag swaps in.

Surface Tibet (CN-XZ) as a search-list entry so it can be picked from
country autocompletes and pickers. The on-wire identifier stays
iso3166:CN-XZ; only the picker pretends.

Route every remaining raw country.flag span through CountryFlag so
bundled SVGs render in autocomplete dropdowns, organizer selects, the
ComposeBox destination switcher, and the world stats dialog.
2026-05-26 19:53:42 -05:00
Chad Curtis 00f936fcd8 Add Palestine to the country list 2026-05-26 19:34:46 -05:00
lemon 151552868b Polish wallet receive and zap fee UI 2026-05-26 12:48:28 -07:00
lemon cb9231d135 Refine wallet nav and fee helpers 2026-05-26 12:44:54 -07:00
lemon 13432b4865 Shorten SP scan Custom hours label to 'Hours'
Picked the noun each locale uses in its existing last3h / last24h
preset translations so the standalone label stays consistent with
the dropdown options it sits underneath.
2026-05-26 12:32:29 -07:00
lemon d4143ec47b Let Since presets actually rescan past blocks
The Math.max(resume, target) clamp inside resolveWindowFromHeight
turned the Since dropdown into a no-op whenever the wallet's
scanHeight had caught up to the chosen window. Picking 'Last week'
one minute after a successful scan resolved to scanHeight + 1, not
to a week ago, so the user couldn't actually rescan history from
the primary control — they had to drop into Advanced -> From block.

Removed the clamp so Since presets honor the wall-clock window
literally. Re-scanning blocks we've already scanned is cheap (the
indexer is just iterating tweak data) and is exactly what the user
asked for. Also dropped the isPresetUpToDate predicate that, after
the original clamp landed, was the mechanism by which Start went
disabled after a scan completed. isManualUpToDate is kept so the
override path still flags 'block number past the tip'.

Regression-of: 38946cbc
2026-05-26 12:32:29 -07:00
lemon be84d96d5f Add Custom Since option to SP scan dialog
Adds a Custom… entry to the Since select that, when picked, reveals
an hours number input directly under the select. The hours value is
parsed as a positive (fractional allowed) number, multiplied to
seconds, and fed through the same mempool.space resolver as the
fixed presets. The Start button stays disabled until a valid hours
value is entered so there's no ambiguous empty-equals-zero submit.

Power users who want sub-hour granularity (e.g. 0.5) get it without
having to drop into the Advanced block-height path.
2026-05-26 12:32:29 -07:00
lemon 0b7347210f Rewind 11 blocks for SP scan boundary, not 3
Bitcoin block timestamps obey BIP-113's median-time-past rule — they
must exceed the median of the previous 11 timestamps but don't have
to be strictly monotonic. Empirically, 1-2-block inversions show up
in the live chain regularly; 3-block rewinds covered the common case
but could still miss a payment landed in a block whose timestamp ran
backwards near the user's selected cutoff. 11 is the principled
upper bound (no inversion can extend further under MTP) and costs
only ~8 extra block fetches per scan.

Regression-of: 46d9952a
2026-05-26 12:32:29 -07:00
lemon 6c175870cb Drop Blockbook fallback for SP scan start-block lookup
mempool.space's timestamp-to-block endpoint is the sole source of
truth now. The Blockbook binary search fallback was sequential and
could stall the UI for ~20 round-trips with no progress feedback
when mempool.space was down. When the lookup fails, surface a toast
that points the user at the Advanced -> From block override and
auto-open the disclosure so the escape hatch is immediately visible.

Regression-of: d6e6d616
2026-05-26 12:32:29 -07:00
lemon b3290b2234 Use mempool timestamp lookup for scan presets 2026-05-26 12:32:29 -07:00
lemon d855d71254 Resolve silent payment scan presets by block time 2026-05-26 12:32:29 -07:00
lemon 5fa96db1c3 Use brand typography for wallet balances 2026-05-26 12:32:29 -07:00
lemon aefa5bc996 Show resolved profile preview for wallet recipients 2026-05-26 12:32:29 -07:00
lemon c5909d3740 Add person search to wallet recipient input 2026-05-26 12:32:29 -07:00
lemon 3ae7775a16 Align wallet send modal with zap amount styling 2026-05-26 12:32:29 -07:00
lemon bb29af595f Defer header wallet balance until after first paint 2026-05-26 12:32:29 -07:00
lemon cb11512e10 Translate SP scan dialog title, subtitle, help label 2026-05-26 12:32:29 -07:00
lemon 7506e7a10c Make SP scan dialog action button full width 2026-05-26 12:32:29 -07:00
lemon 8b24196f2e Restyle SP scan dialog: friendly title, help popover, 1h default 2026-05-26 12:32:29 -07:00
lemon 6a1dc6a8d7 Simplify SP scan dialog with Since presets and Advanced disclosure 2026-05-26 12:32:29 -07:00
lemon b9c8904d6f Tighten wallet column spacing and underline scan link 2026-05-26 12:32:29 -07:00
lemon bf3e80d444 Surface SP scan as 'Check for new payments' link under balance 2026-05-26 12:32:29 -07:00
lemon c5c3f5d63c Rework wallet receive actions layout 2026-05-26 12:32:29 -07:00
lemon 130d5d09c6 Streamline wallet receive panel: refresh icon in copy row, caption below 2026-05-26 12:32:29 -07:00
lemon d9357e624f Inline wallet receive panel under balance with logo QR 2026-05-26 12:32:29 -07:00
lemon 0cfad7cbaa Match wallet balance typography to brand and drop wallet icon 2026-05-26 12:32:29 -07:00
lemon 86e4fa6e24 Replace top-nav search icon with USD wallet balance 2026-05-26 12:32:29 -07:00
Alex Gleason baaf586ea5 Remove webmanifest screenshots from a different app 2026-05-26 13:23:36 -05:00
Alex Gleason 58112adfc6 Remove recent donations preview from campaign donate sidebar 2026-05-25 20:31:57 -05:00
Alex Gleason 57570f8037 Swap esploraApis positions 2026-05-25 20:25:11 -05:00
Alex Gleason 609f9f20b0 Loosen spacing around the campaign activity tabs
Two small fit-and-finish tweaks the previous restyle missed:

1. The tab strip's baseline border sat 1px above the rounded panel's top
   edge, so the panel's rounded corners visually overlapped the active
   tab's under-rule. TabsContent now carries an explicit mt-4 (16px) so
   the panel floats cleanly under the tab strip with breathing room
   above its rounded top corners.

2. Tab labels were spaced gap-1 (4px), too tight for labels that read
   as section headers. Bumped to gap-8 (32px) so 'Comments & donations'
   and 'Ledger' read as separate section titles.

CommentsSection's outer mt-4 is overridden with className=mt-0 at the
call site so the TabsContent gap controls the spacing — no more 32px
double-margin.
2026-05-25 20:22:49 -05:00
Alex Gleason e6dd3a04b8 Restyle campaign activity tabs to read as section headers
The shadcn default 'muted pill control' tab strip felt bolted onto the page
between the action bar and the comments panel. The tab labels also doubled
up with the 'Comments & donations' heading rendered inside the panel — two
section titles stacked.

Replaces the pill control with an underline-style tab strip that visually
serves as the section header for the panel below. The active tab label is
rendered at the same size and weight as the page's other h2 section
headings (text-lg font-semibold tracking-tight), inactive tabs are muted
siblings, and a 1px baseline border carries across the panel width while
the active tab paints a thicker primary under-rule that flows into the
content surface.

CommentsSection's title becomes optional and the campaign page omits it
now that the tab label owns the heading. The dead 'commentsAndDonations'
i18n key is removed from all 16 locales (tabComments carries the same
copy).
2026-05-25 20:04:53 -05:00
Alex Gleason eee74aa9bb Lead campaign ledger rows with USD; show BTC as the secondary number
Flips the headline + subline on each ledger row: USD is now the prominent
top number and the BTC equivalent (full units, not sats) sits below it in
muted text. Falls back to BTC-as-headline when the BTC/USD price isn't
available yet. Renames the i18n leaf 'campaignsDetail.ledger.satsUnit' to
'btcUnit' across en.json and all 15 other locales — BTC is a universal
ticker, so the unit string itself is now 'BTC' everywhere.
2026-05-25 16:27:13 -05:00
Alex Gleason d80e1b0a70 Tab Comments & donations and a new Ledger tab on campaign pages
Moves the existing comments + donations panel under a 'Comments & donations'
tab and introduces a sibling 'Ledger' tab that surfaces public on-chain
activity for the campaign's bc1 address — receives, sends, confirmation
status, block height, and the equivalent USD — sourced from the
already-configured Esplora endpoints with mempool.space deep links per row.

The Ledger tab is rendered only when the campaign declares an on-chain
endpoint ('bc1q…' / 'bc1p…'). Silent-payment-only campaigns intentionally
have no scannable address and degrade to the un-tabbed comments surface to
avoid showing a lone disabled tab.

A new fetchAddressTxs helper in src/lib/bitcoin.ts wraps Esplora's
/address/:addr/txs + /chain/:last_seen_txid pagination, and useAddressLedger
exposes it as an infinite query (50 confirmed tx page size, plus mempool on
the first page).
2026-05-25 15:32:27 -05:00