diff --git a/src/activities-app/App.vue b/src/activities-app/App.vue index 41e9ad1..ac80413 100644 --- a/src/activities-app/App.vue +++ b/src/activities-app/App.vue @@ -54,7 +54,27 @@ const tabs = computed(() => [ disabled: !isAuthenticated.value, }, { name: t('activities.nav.map'), icon: Map, path: '/activities/map' }, - { name: t('activities.nav.favorites'), icon: Heart, path: '/activities/favorites' }, + { + name: t('activities.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 + // can gate on auth (mirrors the Create tab pattern above). + path: '/activities/favorites', + onClick: () => { + if (!isAuthenticated.value) { + toast.info(t('activities.favorites.loginPrompt'), { + action: { + label: t('activities.favorites.logIn'), + onClick: () => router.push('/login'), + }, + }) + return + } + router.push('/activities/favorites') + }, + disabled: !isAuthenticated.value, + }, ]) // Feed tab is active for the bare /activities route AND all sub-paths that