From a77bf7ff6cc7aa23b19b2bbcc56c7a23b1b8ce0a Mon Sep 17 00:00:00 2001 From: Padreug Date: Thu, 21 May 2026 16:01:55 +0200 Subject: [PATCH 1/3] feat(activities): editingEvent in activities store MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src/modules/activities/stores/activities.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/activities/stores/activities.ts b/src/modules/activities/stores/activities.ts index 0387ea4..7c5160c 100644 --- a/src/modules/activities/stores/activities.ts +++ b/src/modules/activities/stores/activities.ts @@ -1,6 +1,7 @@ import { defineStore } from 'pinia' import { ref, computed } from 'vue' import type { Activity } from '../types/activity' +import type { TicketedEvent } from '../types/ticket' /** * Pinia store for cached activities from Nostr relays. @@ -14,6 +15,9 @@ export const useActivitiesStore = defineStore('activities', () => { /** Toggle by the standalone bottom-nav Create tab; mounted dialog lives * in activities-app/App.vue so it's available from every route. */ const showCreateDialog = ref(false) + /** When set, the shell-mounted CreateEventDialog opens in edit mode + * for this LNbits event. Cleared when the dialog closes. */ + const editingEvent = ref(null) // Computed const activities = computed(() => Array.from(activitiesMap.value.values())) @@ -88,6 +92,7 @@ export const useActivitiesStore = defineStore('activities', () => { isLoading, lastUpdated, showCreateDialog, + editingEvent, // Computed activities, From 345ca073af2dda0b9cbea386ddf7ac61f0e79ef0 Mon Sep 17 00:00:00 2001 From: Padreug Date: Thu, 21 May 2026 16:01:55 +0200 Subject: [PATCH 2/3] feat(activities-app): wire shell dialog for edit + approval probes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src/activities-app/App.vue | 48 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/src/activities-app/App.vue b/src/activities-app/App.vue index 4ac820a..0babbc0 100644 --- a/src/activities-app/App.vue +++ b/src/activities-app/App.vue @@ -1,5 +1,5 @@ From b9bca36b506f8c911bec366668bfcab7cb4adff1 Mon Sep 17 00:00:00 2001 From: Padreug Date: Thu, 21 May 2026 16:01:55 +0200 Subject: [PATCH 3/3] feat(activities): edit button on activity detail page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../activities/views/ActivityDetailPage.vue | 64 +++++++++++++++++-- 1 file changed, 57 insertions(+), 7 deletions(-) diff --git a/src/modules/activities/views/ActivityDetailPage.vue b/src/modules/activities/views/ActivityDetailPage.vue index d44793d..6961391 100644 --- a/src/modules/activities/views/ActivityDetailPage.vue +++ b/src/modules/activities/views/ActivityDetailPage.vue @@ -1,5 +1,5 @@