Commit Graph

4631 Commits

Author SHA1 Message Date
lemon 9465eb2215 Pin group reads to app relay 2026-05-28 01:53:19 -07:00
lemon 01d98fa7bb Pin pledge reads to app relay 2026-05-28 01:50:08 -07:00
lemon dcbc2737be Show note share button on desktop 2026-05-28 01:46:16 -07:00
lemon 99822afb82 Show skeletons while featured groups load 2026-05-28 01:40:33 -07:00
lemon 324cdda5b9 Pin moderation reads to app relay 2026-05-28 01:26:11 -07:00
lemon b29635762c Log rendered event relay sources 2026-05-28 01:19:56 -07:00
lemon 7a6ef7a58b Log relay race diagnostics 2026-05-28 01:16:51 -07:00
lemon 7f91afdc66 Remove Damus and nos.lol defaults 2026-05-28 00:59:49 -07:00
lemon 20abad9ee5 Target pledge moderation queries 2026-05-28 00:52:39 -07:00
lemon 655fe98a46 Make placeholder icons opaque 2026-05-28 00:52:39 -07:00
lemon 9cea09b407 Make pledge icons opaque 2026-05-28 00:52:39 -07:00
lemon 7a5164d6fc Make empty pledge icon opaque 2026-05-28 00:51:27 -07:00
lemon 861281cfe7 Hide moderated pledges from discovery 2026-05-28 00:51:27 -07:00
Chad Curtis 2745732731 Redesign campaign banner to respect the source image
The campaign banner previously stretched edge-to-edge with
`object-cover` and a fixed aspect ratio (4:3 mobile, 21:9 sm, 3:1 lg),
which cropped landscape banners hard left/right on phones and clipped
any baked-in text near the image edges.

Replace it with a full-bleed banner that respects the image:

  - Sharp foreground uses `object-contain` capped to the same
    `max-w-6xl` reading column and `max-h-[70vh]`. The banner's
    height is dictated by the image, never by an arbitrary aspect
    ratio. Source pixels are never cropped.
  - The bleed gutters around the contained image are filled by a
    blurred, scaled-up copy of the same image (`object-cover scale-110
    blur-2xl brightness-75`) on a `bg-black` base, with a soft
    horizontal vignette (`from-black/55 via-transparent to-black/55`)
    so the bleed recedes and the centered image reads as the subject.
  - A subtle `shadow-lg shadow-black/25` lifts the banner off the
    page below.
  - Clicking the banner opens the cover in the shared
    `Lightbox` from `@/components/ImageGallery` — same fullscreen
    component already used by NoteContent, NoteCard, PostDetailPage,
    etc. (portal, body-scroll lock, keyboard nav, swipe, pinch zoom,
    Capacitor-safe download).

Move the back / edit / delete chrome to behave differently per
breakpoint. On mobile (where the banner image fills nearly the full
viewport width and the bleed gutters are too narrow to safely host
overlays) the controls live in a black band above the banner. On
`sm:` and up they overlay the banner inside the same `max-w-6xl`
column as glass chips. The black band wrapper collapses to zero
height on desktop so the banner sits flush with the page top.

Add a new `campaignsDetail.openCover` translation key (aria-label
for the cover button) to en.json and translate it into all fifteen
non-English locales.
2026-05-28 02:42:54 -05:00
Chad Curtis 4e1854a9d9 Move campaign title and actions out of the hero overlay
The campaign detail hero overlaid the title, summary, byline, country/
deadline meta, and PostActionBar on top of the banner image, behind an
80%-tall bottom scrim. Two failure modes on every breakpoint:

  - Banner images often carry baked-in text or branding. The scrim
    covered the bottom 80% of the image, and `object-cover` cropped
    the rest hard on phone-portrait containers (mobile used
    `min-h-[92svh]`, roughly 1:1.6 portrait), so banners with side-
    aligned text were sliced off.
  - Long titles and tl;dr summaries overflowed the fixed-height hero.
    With `overflow-hidden` on the header the top of the title got
    clipped behind the upper edge of the banner.

Split the hero into two components. `CampaignHero` keeps only the
banner image and the floating back/admin chip buttons; aspect ratios
stay landscape at every breakpoint (4:3 mobile, 21:9 sm, 3:1 lg) so
`object-cover` only trims a thin strip top/bottom. The top scrim is
gone — the chip buttons already carry `bg-black/30 backdrop-blur-md`
backdrops that read on any image without darkening the banner.

`CampaignHeading` renders the title, summary, byline, meta, divider,
and `PostActionBar` in the normal page flow inside the existing
`max-w-6xl` column on `bg-background`. Title and summary no longer
need a text-shadow or line-clamp; the action bar drops the glass-chip
overrides and inherits its default styling against the page surface.
2026-05-28 02:42:53 -05: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