Was left-aligned alone on its row above the owned + buy blocks,
which read as visually orphaned. Adding `justify-center` aligns
it with how the line reads as a status pill — same alignment the
buy CTA below uses.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The card had it; the detail page didn't. Reuses the same three-
state language as the card ("Unlimited" / "{count} tickets
available" / "Sold out") so the buyer sees the same signal on
both surfaces.
Placed at the top of the tickets section, above the owned-tickets
chip + buy CTA, so it reads top-down: how many are left → how
many you have → buy more.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The detail page's owned-tickets card was rendering one font-mono
row per ticket id — useful for verifying state during development
but pure noise for the buyer. The "View in My Tickets" button
already links to the place where the buyer interacts with the
individual rows. Collapse to a single line: "You have N tickets"
+ the link button, on one row.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three small fixes the buyer flagged on the multi-ticket purchase
flow:
1. Drop the inline QR grid from the success modal. The buyer's
real ticket interaction lives in My Tickets — the modal's job
is just to confirm the purchase landed and point them there.
N stacked QRs made the dialog overflow on small viewports
(point 2) and duplicated UI that already exists on the
destination page.
2. DialogContent gets `max-h-[90dvh] overflow-y-auto` so even
long content (long invoice expiry text, multiple methods, etc.)
scrolls inside the dialog instead of bleeding off the viewport.
3. Companion to events ext c8602e0 which switched every row to a
fresh short-hash id (was: first row reused the 64-hex
payment_hash, rest got short hashes — inconsistent). No webapp
code change for that — we just consume what the backend
returns — but worth noting the ids you'll see now are all
uniform short hashes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Companion to aiolabs/events PR #15's d087bf3 (N rows sharing one
payment_hash). Now that the backend persists each attendee as a
distinct scannable row, the webapp surfaces them properly:
- TicketPaymentStatus carries `ticketIds: string[]` (every row),
with `ticketId` kept for back-compat. checkPaymentStatus reads
both fields off the polling response.
- useTicketPurchase tracks `purchasedTicketIds` + `ticketQRCodes`
(parallel map id → data url). After payment lands the composable
generates one QR per row so each attendee has their own.
- PurchaseTicketDialog success screen renders every QR + ticket id
in a stack with "Ticket N of M" labels. Each can be shared with
a different attendee for an independent door scan.
Reverts the "seats via extra.quantity" workarounds that landed in
the previous two commits — now that rows == tickets the counters
go back to row-count semantics across MyTickets, ActivityCard
badges, ActivityDetailPage owned-tickets, useUserTickets group
tallies, and the dialog's success header.
Door-scan compatibility: the existing LNbits register-page
scanner (events ext static/js/register.js) already reads
`ticket://<id>` QRs and PUTs /tickets/register/<id>. With N rows
each having a unique uuid id, each attendee's QR maps to a
distinct PUT — independent registration, all 3 friends can enter
separately.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Last commit fixed the dialog + ActivityDetailPage to read extra.quantity,
but missed three more row-count → seat-count surfaces in
MyTicketsPage:
- Tab pills (All / Paid / Pending / Registered) used
`paidTickets.length` etc. on the filtered row arrays — so a user
who bought 1+5+5+6+3+1+1+1 = 23 seats across 8 rows saw "All
(8)". Now reads from useUserTickets.{total,paid,pending,
registered}Seats which sum extra.quantity.
- Group header badge "{{ group.tickets.length }} tickets" → uses
group.paidCount + pendingCount (already seat-summed by the
previous fix to groupedTickets).
- Group description gains a "({N} purchases)" sub-line when seats
≠ rows so the buyer can see at a glance "you have 23 tickets
across 8 purchases".
- Per-row carousel card grows a `×N` chip next to the truncated
Ticket #ID when that row represents multi-seat — same chip
language as the ActivityDetailPage owned-tickets section.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Earlier commit landed the backend storing N seats on one row via
extra.quantity (one invoice, one payment, one ticket row), but the
UI kept counting rows instead of seats. A 5-ticket purchase
showed:
Dialog header: "Purchase a ticket for X for 100 sats" ← lied
Success modal: "Ticket purchased!" / one ticket ID ← lied
My Tickets / badges: "1 paid ticket" ← lied
even though the buyer correctly paid 500 sats and 5 seats were
sold (DB verified: extra.quantity=5, sats_paid=500, event.sold
incremented by 5). The bolt11 invoice amount is cryptographic so
the wallet charge was always right — only the labels were wrong.
Fixes:
- ActivityTicketExtra grows `quantity?: number` (the field already
on the wire from the backend; just adding it to the type).
- useOwnedTickets exposes `seatsOnRow(ticket)` and `paidCount`
sums seats (extra.quantity) across rows instead of counting
rows. ActivityCard's "You have N tickets" badge now reflects
actual seat ownership.
- useUserTickets.groupedTickets sums seats into paidCount /
pendingCount / registeredCount so MyTicketsPage groups read
correctly.
- ActivityDetailPage owned-tickets section adds a `×N` chip on
rows that represent multiple seats so the buyer can see which
row covers how many.
- PurchaseTicketDialog header + DialogDescription reflect the
selected quantity ("Purchase 5 tickets" / "5 tickets for X · 500
sats"). The success modal switches to "5 tickets purchased!" and
re-labels the ticket id "Purchase ID (covers all tickets)" so
the buyer doesn't expect 5 separate ids.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two related UX changes for the buy flow:
1. Quantity selector in PurchaseTicketDialog (1-10). The total
line updates as the buyer steps the count up/down; the fiat
conversion preview reflects the totalled amount. Backend caps
the upper bound (HTTP 400 if anyone tries to bypass via curl).
2. Restaurant-style invoice screen: when the invoice is generated,
we drop the "single Pay-with-Wallet button" auto-pay path and
show the QR + amount + Copy + "Open in wallet" together,
restaurant OrderInvoiceCard-style. Below that, a "Pay from my
LNbits wallet" button appears when the buyer is signed in with
a funded wallet — same screen, two paths, buyer picks at the
moment they see the invoice. The poll already started fires on
either path.
useTicketPurchase exposes `payCurrentInvoiceWithWallet()` so the
dialog can trigger the wallet-pay path explicitly without going
through purchaseTicketForEvent again. purchaseTicketForEvent no
longer auto-pays — it just creates the invoice + starts polling.
CreateTicketRequest grows `quantity?` (1..10) and requestTicket
forwards it. Quantity is only sent when > 1 so existing flows
stay byte-identical on the wire.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
i18n: add the missing keys the ticket purchase + owned-tickets
surfaces use across en/es/fr — activities.detail.{buyTicket,
buyAnotherTicket, viewMyTickets, ticketsOwned, unlimitedTickets}
and activities.filters.myTickets. Without these the runtime fell
back to the literal key strings + spammed [intlify] warnings; the
filter chip rendered the bare key text on logged-in sessions.
ticketsOwned uses i18n pluralization so "You have 1 ticket" vs
"You have 5 tickets" both come out correct.
useOwnedTickets: the hasAutoLoaded guard prevented retries after
a transient backend failure (e.g. an LNbits restart mid-fetch).
The composable would stay stuck with tickets = [] forever, so the
buyer landing on a fresh detail page right after a transient error
saw no badges anywhere. Detect the "previous load didn't actually
hydrate" state (lastLoadedUserId still null while authenticated)
and retry on the next useOwnedTickets() call.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A new filter chip sits below the temporal pills, hidden when the
user is logged out. Clicking it narrows the feed to activities the
user holds at least one paid ticket for — intersecting the
existing filter pipeline (temporal / categories / date) with the
ownedActivityIds set from useOwnedTickets.
The coupling lives in useActivities (it already orchestrates the
data + filter pipeline). useActivityFilters stays free of ticket
fetching; it just carries the boolean state. resetFilters clears
the chip alongside the other filters, and hasActiveFilters lights
up when it's on so the "Clear all" affordance is visible.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Until now the Purchase button only existed on EventsPage (the
LNbits-sourced listing). Activities sourced from Nostr relays had
no buy path at all. Now that calendar events carry the AIO
tickets_* tags (aiolabs/events#15), the detail page can wire the
existing PurchaseTicketDialog from any activity that has ticketInfo.
Two new blocks appear above the Organizer card when the activity
is ticketed (ticketInfo set):
- Owned-tickets section (primary-tinted card): shown when the
buyer holds at least one paid ticket. Lists ticket IDs + a
"View in My Tickets" link.
- Buy ticket CTA: shown when remaining capacity allows. Label
switches to "Buy another ticket" when the user already owns at
least one. Price/currency rendered inline so the user knows the
charge before opening the dialog. A Sold-out message replaces
the button when available === 0 and the user has no owned
tickets.
Activity → PurchaseTicketDialog event-shape mapping lives in a
computed so the dialog never receives a partial event. The dialog
itself was untouched (it's the same one EventsPage uses); the
detail page just refreshes useOwnedTickets when the dialog closes
so the badge / section updates immediately after a Lightning
purchase resolves. The inventory side (tickets_available /
tickets_sold counters) updates automatically via the relay
republish from the events extension — no manual refresh needed.
Unauth users get a toast pointing them at login instead of opening
the dialog into a "Login required" state.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Module-level singleton so the badge on every ActivityCard, the
owned-tickets section on ActivityDetailPage, and the (forthcoming)
"My tickets" filter chip on the activity feed all share one fetch
of the user's tickets rather than each instance hitting the
backend.
useOwnedTickets exposes:
- ticketsByActivity: Map<activityId, ActivityTicket[]> for O(1)
lookup from the card/detail surfaces
- ownedActivityIds: Set used by the feed filter
- paidCount(id) / getTickets(id) for ergonomic per-activity reads
- refresh() for consumers that just mutated the user's ticket set
(a successful purchase) to update every surface atomically
Auto-loads on first use after auth is ready, re-fetches when the
current user id changes (login/logout/switch).
ActivityCard grows a primary-colored "You have N tickets" row that
sits next to the existing "X tickets remaining" line — buyer can
see at a glance whether they've already bought in for any activity
in the feed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The aiolabs/events extension publishes six AIO custom tags on every
kind 31922/31923 calendar event (tickets_available, _sold, _price,
_currency, _allow_fiat, _fiat_currency — see aiolabs/events#15) and
republishes the event on every ticket sale. Connected clients pick
up the new state via their existing relay subscription, no REST
polling.
- New TicketTags shape on CalendarTimeEvent + CalendarDateEvent.
parseTicketTags reads the six tags off the raw event; tickets_
currency is the discriminator so non-AIO calendar events (which
don't have these tags) cleanly produce undefined.
- ActivityTicketInfo grows `sold` + `allowFiat` + `fiatCurrency`
for the buyer surfaces, drops the never-populated `total` field,
makes `available` optional (undefined = unlimited capacity).
- Both calendar→Activity converters now populate ticketInfo via
ticketTagsToInfo so Nostr-sourced activities carry the inventory
info that was previously only on LNbits drafts.
- ActivityCard handles the three-state available display
(unlimited / count / sold-out) instead of just truthy/sold-out.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CreateEventDialog gains a collapsible "Buyer notifications" section
exposing the EventExtra fields added upstream in v1.4.0 / v1.6.0:
- email_notifications + nostr_notifications switches — opt buyers
into email and NIP-04 Nostr DM ticket confirmations.
- notification_subject + notification_body inputs — let organizers
customize the message. Empty falls back to extension defaults.
Submit handler builds `extra` by overlaying onto the existing
event.extra so unrelated fields the LNbits admin UI sets
(promo_codes, conditional, min_tickets) survive the round-trip
through the webapp. Populate-from-event mirrors the same.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
TicketApiService.getCurrencies() returns 'sats' (plural) while the
schema, initialValues, and existing comparisons used 'sat' (singular)
— a pre-existing inconsistency in the events extension surface. The
new payment-rails conditionals tripped on it: as soon as the user
picked the populated 'sats' option from the price-currency dropdown,
form.values.currency became 'sats', the `=== 'sat'` check failed, and
the Fiat currency dropdown stayed hidden even with the toggle on.
Normalize all the new comparisons to accept both spellings:
- FiatToggleField: isSatDenomination(d) helper drives both the
v-show and the auto-mirror watch.
- CreateEventDialog Zod superRefine: same accept-both rule on the
require-fiat_currency branch.
- PurchaseTicketDialog: isPriceInSats computed drives the
Lightning-sats badge AND the PriceConversionPreview render
condition AND the inverse conversion watcher's bail-out.
Also flip FiatToggleField to drive dropdown visibility from the
outer FormField's slot value rather than useFormContext — slot
bindings are guaranteed reactive, sidesteps the public-form-context
indirection that earlier left allowFiat stale in the child's
template.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous version called useField directly with a getter for the
field name. That created a child-local field rather than connecting
to the parent form's allow_fiat / fiat_currency state — so the
Switch's on/off visually toggled but the form never knew, and the
conditional Fiat currency dropdown never appeared.
Rewrite around the proven pattern used elsewhere in the dialog: bind
the inputs through FormField (the shadcn-vue / vee-validate Field
component) and reach for cross-field state via useFormContext.
showCurrencyDropdown now reads form.values[allowFiatField] directly,
which mirrors the parent's actual state, and the denomination-mirror
watch goes through form.setFieldValue.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The buyer-side payment-method block now surfaces one button per
configured fiat provider — Stripe, PayPal, Square, SEPA — rather than
a single bare "Fiat" catch-all. Buttons read in provider names so the
buyer never has to guess what rail backs each choice; the dispatch on
click forwards both `rail` and `provider` to the existing
`ticketApi.requestTicket` signature.
PaymentMethodSelector + useFiatProviders from the base module drive
the list. The Lightning button picks up a "≈ N sats" badge whenever
the event price is denominated in fiat, so the buyer sees the live
sat charge alongside the headline price. A new conversion-preview
line under the headline shows the sat→fiat estimate in the inverse
case (sat-denominated event with fiat enabled), giving the rail-vs-
unit asymmetry an explicit place in the UI.
Explanatory copy makes the equivalence explicit: both methods charge
the same amount, rates are estimates, exact amount locks in at
checkout.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Split the bottom of the create/edit form into two semantic sections
that read in the canonical vocabulary:
Pricing
Tickets · Price · Price currency ← renamed from bare "Currency"
Payment methods
Lightning — always on (informational chip)
<FiatToggleField/> ← replaces the inline switch
+ raw fiat_currency dropdown
The toggle field handles the conditional dropdown (hide + auto-mirror
when the price denomination IS the fiat currency) and the disabled-
with-tooltip state when the user has no configured provider, so the
parent form just supplies field names + the denomination value.
Zod superRefine grows a check that requires `fiat_currency` only in
the surface where the toggle exposes the dropdown — `allow_fiat &&
currency === 'sat'`. Submit-time payload drops `fiat_currency` when
`allow_fiat` is off so we don't persist a rail-currency the backend
won't use.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Activities is the first module to mix Lightning + fiat rails; restaurant
and marketplace will follow. Extract the cross-cutting bits to the base
module so the next adoption is a wiring exercise:
- useFiatProviders: reactive `User.fiat_providers` (today the same list
for organizer + buyer because LNbits configures providers globally),
plus `providerMeta()` for label/icon hints.
- usePriceConversion: `convert()` + reactive `useLivePreview()` over
the existing `/api/v1/conversion` endpoint, 60s cache, null on
transient failure.
- PaymentMethodSelector: buyer-side rail picker. `PaymentMethod.id`
enumerates rails (`lightning | fiat | cash | internal | …`) with
`provider` for the fiat case so a multi-provider instance shows one
button per provider instead of a bare "Fiat" catch-all.
- FiatToggleField: organizer-side switch + conditional fiat-currency
dropdown. Auto-disables with a setup-instructions tooltip when the
user has no providers; silently mirrors fiat_currency to a non-sat
price denomination to keep the backend payload consistent.
- PriceConversionPreview: muted "≈ X.XX USD" line for surfaces where
the price denomination differs from the chosen rail's currency.
LnbitsAPI.getConversion wraps the conversion endpoint so the composable
goes through the existing API service rather than raw fetch. CLAUDE.md
gains a "Payment rails pattern" section documenting the canonical
vocabulary ("Price currency" / "Fiat currency" / "Payment method" /
"Also accept fiat" — bare "Currency" and "Pay in fiat" are banned in
payment-context UI labels) and the fiat-providers-are-global note.
The pre-existing `prvkey` comment on User picks up an inline allowlist
marker so the secret scanner stops flagging this file on every commit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Both sides of the fiat-payment surface introduced by events v1.4.0:
CreateEventDialog — organizer-side opt-in:
- New "Accept fiat payments" switch (allow_fiat) + fiat currency
picker (USD/EUR/GBP/CHF). Toggle is always shipped on
create/edit so a true→false flip propagates correctly.
- Hint copy notes that the host's LNbits admin needs a configured
fiat provider (Stripe etc.) for the toggle to actually work at
purchase time.
PurchaseTicketDialog — buyer-side method selector:
- Two-button selector (Lightning / Fiat) shown only when the event
has `allow_fiat=true`. Hidden entirely for Lightning-only events.
- Lightning path: unchanged (uses useTicketPurchase composable).
- Fiat path: posts to the API with `payment_method=fiat`, then
surfaces a "Open <provider> checkout" button that opens the
returned fiat_payment_request URL in a new tab. Payment
confirmation happens via webhook on the backend; ticket appears
in My Tickets on next reload.
EventsPage threads the new fiat fields through `selectedEvent` so
the dialog sees them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The backend rebase brought in PR #50 (fiat checkout + email/Nostr
ticket notifications), v1.6.0 (custom notification subject/body), and
PR #51 (resend-email endpoint). The webapp types lagged.
Aligns the type surface in src/modules/activities/types/ticket.ts:
- EventExtra (with notification toggles + custom subject/body), promo
codes, conditional event config.
- ActivityTicketExtra mirroring backend's TicketExtra (nostr_identifier,
email/nostr notification_sent flags, refund state).
- TicketedEvent + CreateEventRequest gain allow_fiat, fiat_currency, extra.
- TicketPurchaseInvoice extended for fiat: paymentRequest now optional,
fiatPaymentRequest + fiatProvider + isFiat added. **Closes a latent
blocker**: a backend response with is_fiat=true would have lost the
fiat URL during deserialization (silent crash on QR generation).
- New CreateTicketRequest type for the POST /tickets/{id} body, with
the v1.6.1 payment_method + fiat_provider + nostr_identifier fields.
TicketApiService:
- requestTicket() accepts the new optional fields (paymentMethod,
fiatProvider, promoCode, refundAddress, nostrIdentifier) and
deserializes the full TicketPurchaseInvoice shape including fiat.
- fetchUserTickets() / validateTicket() / new resendTicketEmail()
thread the extra metadata through.
useTicketPurchase composable rejects fiat responses with a clear
error (the QR-and-bolt11 path doesn't know fiat); the eventual UI
selector will live in PurchaseTicketDialog.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The form sent naive "YYYY-MM-DDTHH:MM" to the LNbits events backend,
where _to_unix (nostr_publisher.py) assumes UTC when tzinfo is None.
So 08:00 entered in CEST got stored as 08:00 UTC, and the NIP-52 start
tag landed on the relays at the wrong instant — the detail page then
re-localized it to 10:00 (offset doubly applied).
Stamp the wall-clock value with the user's UTC offset before sending so
the backend builds the correct unix and the detail page renders the
intended wall-clock. Seconds (`:00`) included for pre-3.11 Python
fromisoformat compatibility. Round-trips through edit mode unchanged:
splitDateTime trims to "HH:MM" so the suffix drops cleanly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
BottomNav fires onClick regardless of tab.disabled — the opacity gate
was visual only. Mirror BookmarkButton/RSVPButton: show a toast.info
with a Log in action and bail before opening the create dialog.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The only breaking surface in webapp code is SimplePool.subscribeMany —
2.23 dropped the Filter[] form: a single subscription now takes one
Filter, and multi-filter REQs go through subscribeMap. RelayHub gets
an internal poolSubscribe() adapter that routes single-filter to
pool.subscribe() and multi-filter to pool.subscribeMap(), preserving
the external RelayHub.subscribe() API so no downstream modules change.
Peer-dep bump (@noble/* and @scure/* → 2.x) is contained: nostr-tools
is the only consumer in the lockfile, so the major version shift
doesn't conflict with anything else.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Required for pnpm strict-hoisting builds (used by aiolabs/server-deploy
NixOS builds). Without it as a direct dep, Rollup can't resolve
`workbox-window` from vite-plugin-pwa's virtual:pwa-register module —
npm's flat hoisting masked this previously.
- Replace package-lock.json with pnpm-lock.yaml
- Add packageManager: pnpm@10.33.0
- Allowlist postinstall scripts for esbuild, sharp, vue-demi, electron,
electron-winstaller via pnpm.onlyBuiltDependencies
- Pin nostr-tools to 2.15.0 (was ^2.10.4 resolving to 2.15.0 via npm).
A fresh pnpm resolve drifted to 2.23.5, which the regtest nostrrelay
extension can't parse; upgrade deferred to a follow-up issue covering
the matching server-side fix.
Vue's template expression parser doesn't accept multi-line statement
bodies separated by newlines alone — it errors with 'Unexpected token,
expected ","' as it tries to parse the second statement as a
continuation of the first. Convert to the inline-arrow form already
used elsewhere in the codebase (WalletPage.vue, TaskCard.vue, etc.).
Rename willGoToPending → willLandInPending, drop the (now-redundant)
isEditMode predicate from the gate so create can reuse it. Toast
copy now confirms the destination explicitly:
create + pending : "Submitted! Awaiting admin approval — your
draft is visible on your feed with a Pending
badge."
edit + pending : "Updated — awaiting re-approval. Hidden from
the public feed until reviewed."
Closes the surprise where a non-admin user under auto_approve=off
got a generic "Event submitted!" and then couldn't tell whether
their post had been accepted or was just waiting.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ActivityCard now renders a "Yours" badge (top-right corner of the
image) when activity.isMine, and a "Pending review" / "Rejected"
badge (bottom-left) when activity.lnbitsStatus is non-approved. The
creator can spot their own posts at a glance on the main feed —
particularly important for pending drafts that don't exist on
Nostr yet.
ActivityDetailPage echoes both badges next to the category row so
users landing on the detail link of their own draft have the same
signal.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The /activities feed is Nostr-driven, so an event that hasn't been
published yet (typically `proposed` under auto_approve=off) silently
vanishes from the creator's view. Add ticketedEventToActivity (the
LNbits → NIP-52-shape adapter) and call it from useActivities so own
drafts surface alongside Nostr-published activities. Once approved
and published, the relay-sourced Activity has a newer createdAt and
wins on upsert (and lacks lnbitsStatus, so any badge disappears).
Also fire loadOwnEvents from the shell after event-created /
event-updated so a fresh draft shows up immediately, not on the next
subscribe cycle.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ActivityDetailPage.dateDisplay rendered the end of a time-based event
as time-only ("19:00 — 21:45"), implying a single calendar day even
when the event actually spanned multiple days. The end date was
silently lost in the display.
Detect whether start and end share the same calendar day; if not,
repeat the full date on the end side so a multi-day event reads as
"Fri May 29 • 19:00 — Sat May 30 • 21:45".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CreateEventDialog.populateFromEvent released the watcher guard via
setTimeout(0). Switch to nextTick so the release waits for Vue's
microtask flush — setTimeout(0) only schedules a macrotask, which
can run before vee-validate's batched setValues lands, briefly
unguarding the auto-mirror during populate.
useEvents.fetchAll silently swallowed fetchMyEvents failures so a
flaky probe degraded to "public events only" with no signal in the
console. Add a console.warn so the degradation is debuggable without
toast-spamming users on transient errors.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Both the activities-app shell and EventsPage probed isAdmin /
autoApprove with slightly different code, both needed by the edit
dialog's warning copy. Extract into a single composable so the probe
sequence + re-probe-on-auth-flip behavior lives in one place.
Also clear editingEvent eagerly when the bottom-nav Create tab fires
so a Create tap never inherits a stale Edit selection from a prior
close path that didn't run for any reason.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Promote ImageUploadService.extractFileId from private to public so
edit-flow consumers don't re-implement the `/image/original/<id>`
parse. Used by market's CreateProductDialog and activities'
CreateEventDialog when re-populating <ImageUpload> from a stored URL.
Also clarify ImageUpload.removeImage: the `delete_token: ''` placeholder
on re-populated images intentionally skips the server-side DELETE.
We don't own the original upload's one-time token, and removing
client-side shouldn't reach back and wipe shared files.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The NIP-52 d-tag we publish for an event is the LNbits event id (set
in nostr_publisher.build_nip52_event), so a single fetchMyEvents call
can tell us whether the displayed activity belongs to the caller.
When it does, show an Edit button next to Bookmark; clicking sets
the store's editingEvent and opens the shell-mounted dialog in edit
mode.
This was the missing surface — users land on /activities/:id when
they tap a posting, not on /events.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Probe isAdmin / autoApprove once at auth-ready (re-probe on login)
and feed them plus the store's editingEvent into the shell-mounted
CreateEventDialog. Add handleUpdateEvent that picks the right wallet
admin key from the editing event's wallet id.
Without this the Activities standalone app could only Create — the
existing dialog was create-only at shell level even though the
dialog component itself already supported edit mode.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Carry the LNbits event being edited at store level so the
shell-mounted CreateEventDialog (activities-app/App.vue) can open in
edit mode from anywhere a user surfaces their own event — most
importantly the activity detail page, which is where they actually
land when fixing a posting.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Show a "Pending review" (or "Rejected") badge on the user's own
non-approved events, and disable the Buy Ticket button on any
non-approved event with a "Not yet available" label. Probe
auto_approve via the public endpoint with inkey, not adminkey, so the
warning copy works for non-admin owners.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When authenticated, parallel-fetch the caller's own events (any
status) alongside the public approved feed and merge with public-wins
dedup. Without this, an event that drops to `proposed` after a
non-admin edit disappears from the user's view — they couldn't find
it to make a follow-up edit or watch for re-approval.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`fetchMyEvents` hits the existing all_wallets=true endpoint to surface
the caller's own events regardless of status. `getAutoApprove` now
calls the public probe (invoice-key-gated) added in events extension
v1.3.0-aio.5 so non-admin webapp users get accurate edit-flow copy.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pencil button in the card footer of upcoming events the current user
owns (event.wallet ∈ currentUser.wallets). Clicking opens the same
CreateEventDialog in edit mode, pre-populated with the event.
Probe `is_admin` and `auto_approve` once at mount so the dialog can
render the "going back to pending" warning copy accurately for
non-admin owners.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Accept optional `event` prop and `onUpdateEvent` handler. Dialog
toggles title, description, submit button text, and a warning Alert
based on edit mode plus an `isAdmin`/`autoApprove` pair the parent
supplies.
On open in edit mode, populate the form from the event — split stored
"YYYY-MM-DD[THH:MM]" back into date+time inputs, restore categories,
and seed bannerImages from the stored URL by extracting the pict-rs
file ID (same pattern as market's CreateProductDialog).
A clearing-the-banner action during edit sends `banner: null` so the
backend wipes the field instead of keeping the old image. Auto-mirror
watcher is guarded against firing during the initial population.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`updateEvent` calls PUT /events/{id} with the event's wallet admin key
— mirrors the backend's `require_admin_key` decorator (different key
than the inkey used by createEvent).
Add `isAdmin` and `getAutoApprove` probes so the dialog can decide
whether to show "edit will go back to pending approval" copy. Both
degrade to `false` on failure, which biases the warning toward being
shown when in doubt.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Flip ImageUploadOptions.compress so undefined/true → compress with
default knobs, false → skip, object → compress with merged knobs. A
future <ImageUpload> consumer that forgets the prop now gets safe
behavior (small WebP) instead of dumping a 5–8 MB phone photo to
pict-rs.
Drop the now-redundant :compress="true" from the events banner and
market product call sites. Profile keeps its object override since it
tunes maxWidthOrHeight: 512 / maxSizeMB: 0.2 for avatars.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reka UI tightened model-value's type to AcceptableValue, which
includes null. The four inline (v: string) => ... handlers in
PreferencesRow.vue no longer satisfied the prop's expected signature,
breaking TS at the standalone-app build step (forum-app, others).
Drop the string annotation, guard the null case, and cast on the
forward call to preserve the intended narrowing.
Pass tuned compress options to <ImageUpload>: 512px max edge / 200 KB
target. Avatars don't need 1920px and the smaller cap meaningfully
reduces pict-rs storage for a high-volume content type. Closes#59
for the profile consumer.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pass `:compress="true"` to <ImageUpload> so the up-to-5 product images
get resized to 1920px max edge and re-encoded as WebP before hitting
pict-rs. Closes#59 for the market consumer. Default knobs match the
events banner use case — both are gallery-scale images.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Swap the native <input type="date|time"> controls in CreateEventDialog
for the shared DatePicker / TimePicker components so the form looks
like the rest of the shadcn UI instead of browser chrome.
While there:
- End date auto-mirrors start date on pick (and re-mirrors if the
existing end has fallen behind the new start), so a one-day event
needs no extra clicks.
- Zod superRefine rejects end < start, comparing the folded date+time
string so equal-date / later-time is enforced too.
- Move End date/time out of the "More options" collapsible into the
main form flow (drops Collapsible / Separator / ChevronDown / the
showMoreOptions ref).
- End time label reads "End time (optional)" to make the field's
status obvious.
- Banner image label is plain markup (not <FormItem>) since it's
managed via bannerImages ref outside vee-validate.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>