From 89b3dfc03d2b799b5bd260ec639161e7c8771a67 Mon Sep 17 00:00:00 2001 From: Padreug Date: Thu, 4 Jun 2026 22:21:41 +0200 Subject: [PATCH] feat(activities): restructure bottom nav around Home/MyTickets/Hosting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bottom-nav tabs become Home, My tickets, Hosting, Map, Favorites. - Feed is relabeled "Home" (en/fr; es was already "Inicio"). - My tickets and Hosting move out of the sidebar menu back into the bottom nav. Hosting is a synthetic tab — no path of its own; it toggles the existing onlyHosting feed filter and lands on /activities, with Home as the inverse (clears the filter on tap). - Calendar leaves the bottom nav. The week strip now ends with a small calendar icon button that routes to /activities/calendar, so the entry point sits adjacent to the date UI instead of competing for a tab slot. - Create activity leaves the bottom nav too. A full-width "+ Create activity" CTA appears at the top of the feed only when the Hosting tab is active, so the Create entry point lives inside the section it belongs to. BottomTab gains an optional `isActive()` predicate so tabs whose active condition doesn't reduce to "current path starts with x" (e.g. Hosting) can compute their own state. --- src/components/layout/BottomNav.vue | 14 ++- src/events-app/App.vue | 109 ++++++++++++------------ src/i18n/locales/en.ts | 2 +- src/i18n/locales/fr.ts | 2 +- src/modules/events/views/EventsPage.vue | 52 ++++++++++- 5 files changed, 115 insertions(+), 64 deletions(-) diff --git a/src/components/layout/BottomNav.vue b/src/components/layout/BottomNav.vue index c27ef7a..e23fd98 100644 --- a/src/components/layout/BottomNav.vue +++ b/src/components/layout/BottomNav.vue @@ -17,6 +17,11 @@ export interface BottomTab { /** Render the entry ghosted (opacity-reduced). Used for coming-soon and * for auth-required tabs when the user is logged out. */ disabled?: boolean + /** Per-tab active-state override for entries whose active condition + * doesn't reduce to "current route starts with this.path" — e.g. a + * "Hosting" tab that is active when a feed-filter ref is on. When + * set it wins over the App-level `isActive(path)` matcher. */ + isActive?: () => boolean } interface Props { @@ -37,6 +42,11 @@ function onTabClick(tab: BottomTab) { } if (tab.path) router.push(tab.path) } + +function isTabActive(tab: BottomTab): boolean { + if (tab.isActive) return tab.isActive() + return !!tab.path && props.isActive(tab.path) +}