From 131eef88ec4670dbe493b45664e743eb190a4da9 Mon Sep 17 00:00:00 2001 From: Padreug Date: Tue, 9 Jun 2026 17:39:24 +0200 Subject: [PATCH 1/9] refactor(events): rename activities module to events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The module name "activities" was originally chosen to avoid colliding with Nostr's `Event` type. In practice the defense added friction without preventing confusion: the backend extension is named `events`, NIP-52 calls them "Calendar Events", and the UI already displayed "Events". The collision with `nostr-tools` `Event` is handled cleanly by the existing `import { Event as NostrEvent }` alias pattern (already in 5 files inside the module). Renames `src/modules/activities` → `src/modules/events` and `src/activities-app` → `src/events-app`. Touches: - Module dir + 48 internal files (types, services, composables, views, components, store) renamed with case-sensitive replacement (`Activity`→`Event`, `Activities`→`Events`). - Route paths: `/activities/*` → `/events/*`. The existing legacy `/events` route (ticketing management view) moves to `/my-events`, freeing `/events` for the canonical feed/discovery page. A new "My Events" entry is added to the user dropdown menu for access. - Standalone PWA entry: `activities.html` → `events.html`, `vite.activities.config.ts` → `vite.events.config.ts`. - npm scripts: `dev:activities`/`build:activities`/`preview:activities` → `:events`. `build:demo` and `dev:all` updated accordingly. - DI tokens: `SERVICE_TOKENS.ACTIVITIES_*` → `EVENTS_*`. - Hub config: `appConfig.modules.activities` → `modules.events`. - i18n: `activities.*` namespace → `events.*` in en/fr/es locales; English domain strings updated ("Activities"→"Events", "Search activities..."→"Search events..."). French/Spanish display values realigned to "Événements"/"Eventos" at the title key; deeper translation cleanup left for a follow-up. - Hub icon label: "Activities" → "Events"; env key `VITE_HUB_ACTIVITIES_URL` → `VITE_HUB_EVENTS_URL` (also updated in `.env.example`). - Stale `CreateActivityDialog.vue` removed (only referenced from a defunct comment; `CreateEventDialog.vue` is the live one). Build-output dir renamed `dist-activities/` → `dist-events/`; the `build:events` npm script reflects the new name. server-deploy still hardcodes `buildScript = "build:activities"` and `distDir = "dist-activities"` in `modules/services/standalones.nix:46-47`; a matching update there needs to land before this branch's webapp commit gets a flake-input bump. `Event` naming inside the module no longer collides with the Nostr `Event` import — those 5 files already use the `NostrEvent` alias. Disambiguation inside `EventsNostrService.queryCalendarEvents` was needed: local `events`/`event` variables for the domain side, with `nostrEvent`/`nostrEvents` for the protocol side. vue-tsc passes. PWA manifest still hardcodes "Sortir" branding; that is templated through `VITE_APP_NAME` in a follow-up commit on the same branch. Co-Authored-By: Claude Opus 4.7 (1M context) --- .env.example | 8 +- activities.html => events.html | 6 +- package.json | 10 +- src/app.config.ts | 4 +- src/app.ts | 2 +- src/composables/useModularNavigation.ts | 12 +- src/core/di-container.ts | 6 +- src/{activities-app => events-app}/App.vue | 74 ++--- .../app.config.ts | 8 +- src/{activities-app => events-app}/app.ts | 16 +- src/{activities-app => events-app}/main.ts | 0 .../views/SettingsPage.vue | 16 +- src/i18n/locales/en.ts | 19 +- src/i18n/locales/es.ts | 9 +- src/i18n/locales/fr.ts | 9 +- src/i18n/types.ts | 7 +- .../components/CreateActivityDialog.vue | 278 ------------------ .../views/ActivitiesCalendarPage.vue | 27 -- .../activities/views/ActivitiesMapPage.vue | 55 ---- .../components/BookmarkButton.vue | 6 +- .../components/CategoryFilterBar.vue | 10 +- .../components/CategorySelector.vue | 12 +- .../components/CreateEventDialog.vue | 2 +- .../components/DatePickerStrip.vue | 0 .../components/EventCalendarView.vue} | 60 ++-- .../components/EventCard.vue} | 80 ++--- .../components/EventList.vue} | 26 +- .../components/EventMap.vue} | 32 +- .../components/EventSearchOverlay.vue} | 48 +-- .../components/LocationPicker.vue | 0 .../components/OrganizerCard.vue | 0 .../components/PurchaseTicketDialog.vue | 0 .../components/RSVPButton.vue | 16 +- .../components/TemporalFilterBar.vue | 10 +- .../composables/useApprovalState.ts | 2 +- .../composables/useBookmarks.ts | 14 +- .../composables/useDateLocale.ts | 0 .../composables/useEventDetail.ts} | 42 +-- .../composables/useEventFilters.ts} | 64 ++-- .../composables/useEvents.ts} | 74 ++--- .../composables/useMyEvents.ts} | 4 +- .../composables/useOrganizerProfile.ts | 2 +- .../composables/useOwnedTickets.ts | 34 +-- .../composables/useRSVP.ts | 46 +-- .../composables/useTicketPurchase.ts | 0 .../composables/useTicketScanner.ts | 8 +- .../composables/useUserTickets.ts | 8 +- src/modules/{activities => events}/index.ts | 80 ++--- .../services/EventsNostrService.ts} | 52 ++-- .../services/LnbitsPaymentProvider.ts | 0 .../services/PaymentProviderInterface.ts | 0 .../services/TicketApiService.ts | 30 +- .../activities.ts => events/stores/events.ts} | 70 ++--- .../{activities => events}/types/category.ts | 8 +- .../activity.ts => events/types/event.ts} | 54 ++-- .../{activities => events}/types/filters.ts | 10 +- .../{activities => events}/types/nip52.ts | 0 .../{activities => events}/types/ticket.ts | 14 +- .../views/EventDetailPage.vue} | 140 ++++----- .../events/views/EventsCalendarPage.vue | 27 ++ .../views/EventsFavoritesPage.vue} | 36 +-- src/modules/events/views/EventsMapPage.vue | 55 ++++ .../views/EventsPage.vue} | 40 +-- .../views/MyEventsPage.vue} | 4 +- .../views/MyTicketsPage.vue | 2 +- .../views/ScanTicketsPage.vue | 18 +- src/modules/market/composables/useMarket.ts | 2 +- src/modules/market/views/CheckoutPage.vue | 2 +- src/pages/Hub.vue | 2 +- ...ivities.config.ts => vite.events.config.ts | 26 +- 70 files changed, 781 insertions(+), 1057 deletions(-) rename activities.html => events.html (77%) rename src/{activities-app => events-app}/App.vue (61%) rename src/{activities-app => events-app}/app.config.ts (92%) rename src/{activities-app => events-app}/app.ts (89%) rename src/{activities-app => events-app}/main.ts (100%) rename src/{activities-app => events-app}/views/SettingsPage.vue (83%) delete mode 100644 src/modules/activities/components/CreateActivityDialog.vue delete mode 100644 src/modules/activities/views/ActivitiesCalendarPage.vue delete mode 100644 src/modules/activities/views/ActivitiesMapPage.vue rename src/modules/{activities => events}/components/BookmarkButton.vue (82%) rename src/modules/{activities => events}/components/CategoryFilterBar.vue (83%) rename src/modules/{activities => events}/components/CategorySelector.vue (74%) rename src/modules/{activities => events}/components/CreateEventDialog.vue (99%) rename src/modules/{activities => events}/components/DatePickerStrip.vue (100%) rename src/modules/{activities/components/ActivityCalendarView.vue => events/components/EventCalendarView.vue} (75%) rename src/modules/{activities/components/ActivityCard.vue => events/components/EventCard.vue} (70%) rename src/modules/{activities/components/ActivityList.vue => events/components/EventList.vue} (70%) rename src/modules/{activities/components/ActivityMap.vue => events/components/EventMap.vue} (68%) rename src/modules/{activities/components/ActivitySearchOverlay.vue => events/components/EventSearchOverlay.vue} (76%) rename src/modules/{activities => events}/components/LocationPicker.vue (100%) rename src/modules/{activities => events}/components/OrganizerCard.vue (100%) rename src/modules/{activities => events}/components/PurchaseTicketDialog.vue (100%) rename src/modules/{activities => events}/components/RSVPButton.vue (75%) rename src/modules/{activities => events}/components/TemporalFilterBar.vue (72%) rename src/modules/{activities => events}/composables/useApprovalState.ts (96%) rename src/modules/{activities => events}/composables/useBookmarks.ts (87%) rename src/modules/{activities => events}/composables/useDateLocale.ts (100%) rename src/modules/{activities/composables/useActivityDetail.ts => events/composables/useEventDetail.ts} (57%) rename src/modules/{activities/composables/useActivityFilters.ts => events/composables/useEventFilters.ts} (70%) rename src/modules/{activities/composables/useActivities.ts => events/composables/useEvents.ts} (64%) rename src/modules/{activities/composables/useEvents.ts => events/composables/useMyEvents.ts} (95%) rename src/modules/{activities => events}/composables/useOrganizerProfile.ts (98%) rename src/modules/{activities => events}/composables/useOwnedTickets.ts (78%) rename src/modules/{activities => events}/composables/useRSVP.ts (83%) rename src/modules/{activities => events}/composables/useTicketPurchase.ts (100%) rename src/modules/{activities => events}/composables/useTicketScanner.ts (96%) rename src/modules/{activities => events}/composables/useUserTickets.ts (95%) rename src/modules/{activities => events}/index.ts (59%) rename src/modules/{activities/services/ActivitiesNostrService.ts => events/services/EventsNostrService.ts} (78%) rename src/modules/{activities => events}/services/LnbitsPaymentProvider.ts (100%) rename src/modules/{activities => events}/services/PaymentProviderInterface.ts (100%) rename src/modules/{activities => events}/services/TicketApiService.ts (94%) rename src/modules/{activities/stores/activities.ts => events/stores/events.ts} (50%) rename src/modules/{activities => events}/types/category.ts (71%) rename src/modules/{activities/types/activity.ts => events/types/event.ts} (78%) rename src/modules/{activities => events}/types/filters.ts (66%) rename src/modules/{activities => events}/types/nip52.ts (100%) rename src/modules/{activities => events}/types/ticket.ts (94%) rename src/modules/{activities/views/ActivityDetailPage.vue => events/views/EventDetailPage.vue} (70%) create mode 100644 src/modules/events/views/EventsCalendarPage.vue rename src/modules/{activities/views/ActivitiesFavoritesPage.vue => events/views/EventsFavoritesPage.vue} (56%) create mode 100644 src/modules/events/views/EventsMapPage.vue rename src/modules/{activities/views/ActivitiesPage.vue => events/views/EventsPage.vue} (81%) rename src/modules/{activities/views/EventsPage.vue => events/views/MyEventsPage.vue} (99%) rename src/modules/{activities => events}/views/MyTicketsPage.vue (99%) rename src/modules/{activities => events}/views/ScanTicketsPage.vue (94%) rename vite.activities.config.ts => vite.events.config.ts (86%) diff --git a/.env.example b/.env.example index ecae912..f432fde 100644 --- a/.env.example +++ b/.env.example @@ -64,7 +64,7 @@ VITE_MARKET_NADDR=naddr1qqjxgdp4vv6rydej943n2dny956rwwf4943xzwfc95ekyd3evenrsvrr # # In LOCAL DEV with `npm run dev:all` use the per-app dev ports (defined # in the vite configs): -# VITE_HUB_ACTIVITIES_URL=http://localhost:5181 +# VITE_HUB_EVENTS_URL=http://localhost:5181 # VITE_HUB_LIBRA_URL=http://localhost:5180 # VITE_HUB_WALLET_URL=http://localhost:5182 # VITE_HUB_CHAT_URL=http://localhost:5183 @@ -74,7 +74,7 @@ VITE_MARKET_NADDR=naddr1qqjxgdp4vv6rydej943n2dny956rwwf4943xzwfc95ekyd3evenrsvrr # VITE_HUB_RESTAURANT_URL=http://localhost:5187 # # In PATH-MODE production (recommended for demo) — note the trailing slash: -# VITE_HUB_ACTIVITIES_URL=https://demo.example.com/activities/ +# VITE_HUB_EVENTS_URL=https://demo.example.com/events/ # VITE_HUB_LIBRA_URL=https://demo.example.com/libra/ # VITE_HUB_WALLET_URL=https://demo.example.com/wallet/ # VITE_HUB_CHAT_URL=https://demo.example.com/chat/ @@ -84,11 +84,11 @@ VITE_MARKET_NADDR=naddr1qqjxgdp4vv6rydej943n2dny956rwwf4943xzwfc95ekyd3evenrsvrr # VITE_HUB_RESTAURANT_URL=https://demo.example.com/restaurant/ # # In SUBDOMAIN-MODE production: -# VITE_HUB_ACTIVITIES_URL=https://sortir.example.com +# VITE_HUB_EVENTS_URL=https://sortir.example.com # VITE_HUB_LIBRA_URL=https://libra.example.com # ...etc # ─────────────────────────────────────────────────────────────────────── -VITE_HUB_ACTIVITIES_URL= +VITE_HUB_EVENTS_URL= VITE_HUB_LIBRA_URL= VITE_HUB_WALLET_URL= VITE_HUB_CHAT_URL= diff --git a/activities.html b/events.html similarity index 77% rename from activities.html rename to events.html index b555a4d..143d21a 100644 --- a/activities.html +++ b/events.html @@ -9,12 +9,12 @@ - Sortir — Activités + Sortir — Events - +
- + diff --git a/package.json b/package.json index 1770e19..5916f09 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,9 @@ "build": "vue-tsc -b && vite build", "preview": "vite preview --host", "analyze": "vite build --mode analyze", - "dev:activities": "vite --host --config vite.activities.config.ts", - "build:activities": "vue-tsc -b && vite build --config vite.activities.config.ts", - "preview:activities": "vite preview --host --config vite.activities.config.ts", + "dev:events": "vite --host --config vite.events.config.ts", + "build:events": "vue-tsc -b && vite build --config vite.events.config.ts", + "preview:events": "vite preview --host --config vite.events.config.ts", "dev:libra": "vite --host --config vite.libra.config.ts", "build:libra": "vue-tsc -b && vite build --config vite.libra.config.ts", "preview:libra": "vite preview --host --config vite.libra.config.ts", @@ -33,8 +33,8 @@ "dev:restaurant": "vite --host --config vite.restaurant.config.ts", "build:restaurant": "vue-tsc -b && vite build --config vite.restaurant.config.ts", "preview:restaurant": "vite preview --host --config vite.restaurant.config.ts", - "dev:all": "concurrently -n hub,libra,sortir,wallet,chat,forum,market,tasks,restaurant -c blue,magenta,cyan,yellow,green,blue,red,gray,green \"npm:dev\" \"npm:dev:libra\" \"npm:dev:activities\" \"npm:dev:wallet\" \"npm:dev:chat\" \"npm:dev:forum\" \"npm:dev:market\" \"npm:dev:tasks\" \"npm:dev:restaurant\"", - "build:demo": "npm run build && VITE_BASE_PATH=/sortir/ npm run build:activities && VITE_BASE_PATH=/libra/ npm run build:libra && VITE_BASE_PATH=/wallet/ npm run build:wallet && VITE_BASE_PATH=/chat/ npm run build:chat && VITE_BASE_PATH=/forum/ npm run build:forum && VITE_BASE_PATH=/market/ npm run build:market && VITE_BASE_PATH=/tasks/ npm run build:tasks && VITE_BASE_PATH=/restaurant/ npm run build:restaurant", + "dev:all": "concurrently -n hub,libra,sortir,wallet,chat,forum,market,tasks,restaurant -c blue,magenta,cyan,yellow,green,blue,red,gray,green \"npm:dev\" \"npm:dev:libra\" \"npm:dev:events\" \"npm:dev:wallet\" \"npm:dev:chat\" \"npm:dev:forum\" \"npm:dev:market\" \"npm:dev:tasks\" \"npm:dev:restaurant\"", + "build:demo": "npm run build && VITE_BASE_PATH=/sortir/ npm run build:events && VITE_BASE_PATH=/libra/ npm run build:libra && VITE_BASE_PATH=/wallet/ npm run build:wallet && VITE_BASE_PATH=/chat/ npm run build:chat && VITE_BASE_PATH=/forum/ npm run build:forum && VITE_BASE_PATH=/market/ npm run build:market && VITE_BASE_PATH=/tasks/ npm run build:tasks && VITE_BASE_PATH=/restaurant/ npm run build:restaurant", "electron:dev": "concurrently \"vite --host\" \"electron-forge start\"", "electron:build": "vue-tsc -b && vite build && electron-builder", "electron:package": "electron-builder", diff --git a/src/app.config.ts b/src/app.config.ts index c1447ea..6753927 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -3,8 +3,8 @@ import type { AppConfig } from './core/types' /** * Minimal AIO hub configuration. * The all-in-one app at app.${domain} ships only the base module — - * each feature module (wallet, chat, market, tasks, forum, activities, - * libra) is now its own standalone PWA at its own subdomain. + * each feature module (wallet, chat, market, tasks, forum, events, + * libra) is now its own standalone PWA at its own subdomain. */ export const appConfig: AppConfig = { modules: { diff --git a/src/app.ts b/src/app.ts index 557c324..48ce5e9 100644 --- a/src/app.ts +++ b/src/app.ts @@ -20,7 +20,7 @@ import { installLenientAuthGuard, markAuthReady, catchAllRoute } from '@/lib/rou * * The all-in-one app at app.${domain} now ships only the base module * plus a chakra icon hub linking out to the standalone module apps - * (wallet, chat, market, tasks, forum, activities, libra). + * (wallet, chat, market, tasks, forum, events, libra). */ export async function createAppInstance() { console.log('🚀 Starting AIO hub...') diff --git a/src/composables/useModularNavigation.ts b/src/composables/useModularNavigation.ts index a29efd2..17a6abc 100644 --- a/src/composables/useModularNavigation.ts +++ b/src/composables/useModularNavigation.ts @@ -26,7 +26,7 @@ export function useModularNavigation() { items.push({ name: t('nav.home'), href: '/', requiresAuth: true }) // Add navigation items based on enabled modules - if (appConfig.modules.activities?.enabled) { + if (appConfig.modules.events?.enabled) { items.push({ name: t('nav.events'), href: '/events', @@ -67,14 +67,20 @@ export function useModularNavigation() { const userMenuItems = computed(() => { const items: NavigationItem[] = [] - // Activities module items (events + tickets) - if (appConfig.modules.activities?.enabled) { + // Events module items (tickets + my events) + if (appConfig.modules.events?.enabled) { items.push({ name: 'My Tickets', href: '/my-tickets', icon: 'Ticket', requiresAuth: true }) + items.push({ + name: 'My Events', + href: '/my-events', + icon: 'CalendarPlus', + requiresAuth: true + }) } // Market module items diff --git a/src/core/di-container.ts b/src/core/di-container.ts index fa6e762..f406812 100644 --- a/src/core/di-container.ts +++ b/src/core/di-container.ts @@ -147,9 +147,9 @@ export const SERVICE_TOKENS = { // Nostr transport (kind-21000 RPC over relays — LNbits backend) NOSTR_TRANSPORT_SERVICE: Symbol('nostrTransportService'), - // Activities services (Nostr-native events + ticketing module) - ACTIVITIES_NOSTR_SERVICE: Symbol('activitiesNostrService'), - ACTIVITIES_TICKET_API: Symbol('activitiesTicketApi'), + // Events services (Nostr-native NIP-52 calendar events + LNbits ticketing) + EVENTS_NOSTR_SERVICE: Symbol('eventsNostrService'), + EVENTS_TICKET_API: Symbol('eventsTicketApi'), TICKET_API: Symbol('ticketApi'), // Invoice services diff --git a/src/activities-app/App.vue b/src/events-app/App.vue similarity index 61% rename from src/activities-app/App.vue rename to src/events-app/App.vue index ac80413..2540dad 100644 --- a/src/activities-app/App.vue +++ b/src/events-app/App.vue @@ -7,38 +7,38 @@ import { CalendarDays, Map, Heart, Search, Plus } from 'lucide-vue-next' import AppShell from '@/components/layout/AppShell.vue' import type { BottomTab } from '@/components/layout/BottomNav.vue' import { useAuth } from '@/composables/useAuthService' -import { useActivitiesStore } from '@/modules/activities/stores/activities' -import { useActivities } from '@/modules/activities/composables/useActivities' -import { useApprovalState } from '@/modules/activities/composables/useApprovalState' +import { useEventsStore } from '@/modules/events/stores/events' +import { useEvents } from '@/modules/events/composables/useEvents' +import { useApprovalState } from '@/modules/events/composables/useApprovalState' import { injectService, SERVICE_TOKENS } from '@/core/di-container' -import type { TicketApiService } from '@/modules/activities/services/TicketApiService' -import type { CreateEventRequest } from '@/modules/activities/types/ticket' -import CreateEventDialog from '@/modules/activities/components/CreateEventDialog.vue' +import type { TicketApiService } from '@/modules/events/services/TicketApiService' +import type { CreateEventRequest } from '@/modules/events/types/ticket' +import CreateEventDialog from '@/modules/events/components/CreateEventDialog.vue' const route = useRoute() const router = useRouter() const { t } = useI18n() const { isAuthenticated, currentUser } = useAuth() -const activitiesStore = useActivitiesStore() +const eventsStore = useEventsStore() const { isAdmin, autoApprove } = useApprovalState() -// Used to merge own LNbits drafts into the activities feed right after +// Used to merge own LNbits drafts into the events feed right after // the user creates or edits an event — otherwise the new draft only -// surfaces on the next ActivitiesPage subscribe cycle. -const { loadOwnEvents } = useActivities() +// surfaces on the next EventsPage subscribe cycle. +const { loadOwnEvents } = useEvents() // Settings dropped — theme/lang/currency now live in the shared profile sheet. // Create lives in the bottom nav: when logged out, tapping it shows an // auth-prompt toast (mirroring BookmarkButton/RSVPButton) instead of // opening the dialog. Per-app placement deliberation tracked at #53. const tabs = computed(() => [ - { name: t('activities.nav.feed'), icon: Search, path: '/activities' }, - { name: t('activities.nav.calendar'), icon: CalendarDays, path: '/activities/calendar' }, + { name: t('events.nav.feed'), icon: Search, path: '/events' }, + { name: t('events.nav.calendar'), icon: CalendarDays, path: '/events/calendar' }, { - name: t('activities.createNew'), + name: t('events.createNew'), icon: Plus, onClick: () => { if (!isAuthenticated.value) { - toast.info('Log in to create an activity', { + toast.info('Log in to create an event', { action: { label: 'Log in', onClick: () => router.push('/login'), @@ -48,52 +48,52 @@ const tabs = computed(() => [ } // Defensively clear any lingering edit selection so the Create // tap always opens in Create mode regardless of a prior Edit. - activitiesStore.editingEvent = null - activitiesStore.showCreateDialog = true + eventsStore.editingEvent = null + eventsStore.showCreateDialog = true }, disabled: !isAuthenticated.value, }, - { name: t('activities.nav.map'), icon: Map, path: '/activities/map' }, + { name: t('events.nav.map'), icon: Map, path: '/events/map' }, { - name: t('activities.nav.favorites'), + name: t('events.nav.favorites'), icon: Heart, // path kept so the tab stays active-highlighted while the user is - // on /activities/favorites; onClick wins for the actual tap so we + // on /events/favorites; onClick wins for the actual tap so we // can gate on auth (mirrors the Create tab pattern above). - path: '/activities/favorites', + path: '/events/favorites', onClick: () => { if (!isAuthenticated.value) { - toast.info(t('activities.favorites.loginPrompt'), { + toast.info(t('events.favorites.loginPrompt'), { action: { - label: t('activities.favorites.logIn'), + label: t('events.favorites.logIn'), onClick: () => router.push('/login'), }, }) return } - router.push('/activities/favorites') + router.push('/events/favorites') }, disabled: !isAuthenticated.value, }, ]) -// Feed tab is active for the bare /activities route AND all sub-paths that -// aren't owned by another tab (e.g. /activities/ detail pages). +// Feed tab is active for the bare /events route AND all sub-paths that +// aren't owned by another tab (e.g. /events/ detail pages). function isActive(path: string): boolean { - if (path === '/activities') { + if (path === '/events') { return ( - route.path === '/activities' || - (route.path.startsWith('/activities/') && - !route.path.startsWith('/activities/calendar') && - !route.path.startsWith('/activities/map') && - !route.path.startsWith('/activities/favorites')) + route.path === '/events' || + (route.path.startsWith('/events/') && + !route.path.startsWith('/events/calendar') && + !route.path.startsWith('/events/map') && + !route.path.startsWith('/events/favorites')) ) } return route.path.startsWith(path) } // Dialog mount lives at shell level so the Create tab works from any route -// within the activities standalone, not just /activities. +// within the events standalone, not just /events. async function handleCreateEvent(eventData: CreateEventRequest) { const ticketApi = injectService(SERVICE_TOKENS.TICKET_API) as TicketApiService const invoiceKey = currentUser.value?.wallets?.[0]?.inkey @@ -105,7 +105,7 @@ async function handleUpdateEvent(eventId: string, eventData: CreateEventRequest) const ticketApi = injectService(SERVICE_TOKENS.TICKET_API) as TicketApiService // PUT /events/{id} requires the event's wallet admin key. const wallet = (currentUser.value?.wallets ?? []).find( - (w) => w.id === activitiesStore.editingEvent?.wallet, + (w) => w.id === eventsStore.editingEvent?.wallet, ) const adminKey = wallet?.adminkey if (!adminKey) { @@ -115,18 +115,18 @@ async function handleUpdateEvent(eventId: string, eventData: CreateEventRequest) } function handleDialogOpenChange(open: boolean) { - activitiesStore.showCreateDialog = open + eventsStore.showCreateDialog = open // Closing always clears the edit selection so the next "+ Create" // opens clean instead of inheriting the last-edited event. - if (!open) activitiesStore.editingEvent = null + if (!open) eventsStore.editingEvent = null }