Compare commits
No commits in common. "297b05e8e51627d467a1d0983dda4715d3d9e897" and "43356f5dfb2f340cb8a7071e82a76388e411849d" have entirely different histories.
297b05e8e5
...
43356f5dfb
1 changed files with 4 additions and 15 deletions
|
|
@ -1,8 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { toast } from 'vue-sonner'
|
|
||||||
import { CalendarDays, Map, Heart, Search, Plus } from 'lucide-vue-next'
|
import { CalendarDays, Map, Heart, Search, Plus } from 'lucide-vue-next'
|
||||||
import AppShell from '@/components/layout/AppShell.vue'
|
import AppShell from '@/components/layout/AppShell.vue'
|
||||||
import type { BottomTab } from '@/components/layout/BottomNav.vue'
|
import type { BottomTab } from '@/components/layout/BottomNav.vue'
|
||||||
|
|
@ -16,7 +15,6 @@ import type { CreateEventRequest } from '@/modules/activities/types/ticket'
|
||||||
import CreateEventDialog from '@/modules/activities/components/CreateEventDialog.vue'
|
import CreateEventDialog from '@/modules/activities/components/CreateEventDialog.vue'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const { isAuthenticated, currentUser } = useAuth()
|
const { isAuthenticated, currentUser } = useAuth()
|
||||||
const activitiesStore = useActivitiesStore()
|
const activitiesStore = useActivitiesStore()
|
||||||
|
|
@ -27,9 +25,9 @@ const { isAdmin, autoApprove } = useApprovalState()
|
||||||
const { loadOwnEvents } = useActivities()
|
const { loadOwnEvents } = useActivities()
|
||||||
|
|
||||||
// Settings dropped — theme/lang/currency now live in the shared profile sheet.
|
// 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
|
// Create lives in the bottom nav (auth-gated): activity creation is a deliberate
|
||||||
// auth-prompt toast (mirroring BookmarkButton/RSVPButton) instead of
|
// act, surfacing it as a tab keeps it one tap away when authed and out of the
|
||||||
// opening the dialog. Per-app placement deliberation tracked at #53.
|
// way when not. Per-app placement deliberation tracked at #53.
|
||||||
const tabs = computed<BottomTab[]>(() => [
|
const tabs = computed<BottomTab[]>(() => [
|
||||||
{ name: t('activities.nav.feed'), icon: Search, path: '/activities' },
|
{ name: t('activities.nav.feed'), icon: Search, path: '/activities' },
|
||||||
{ name: t('activities.nav.calendar'), icon: CalendarDays, path: '/activities/calendar' },
|
{ name: t('activities.nav.calendar'), icon: CalendarDays, path: '/activities/calendar' },
|
||||||
|
|
@ -37,15 +35,6 @@ const tabs = computed<BottomTab[]>(() => [
|
||||||
name: t('activities.createNew'),
|
name: t('activities.createNew'),
|
||||||
icon: Plus,
|
icon: Plus,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
if (!isAuthenticated.value) {
|
|
||||||
toast.info('Log in to create an activity', {
|
|
||||||
action: {
|
|
||||||
label: 'Log in',
|
|
||||||
onClick: () => router.push('/login'),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// Defensively clear any lingering edit selection so the Create
|
// Defensively clear any lingering edit selection so the Create
|
||||||
// tap always opens in Create mode regardless of a prior Edit.
|
// tap always opens in Create mode regardless of a prior Edit.
|
||||||
activitiesStore.editingEvent = null
|
activitiesStore.editingEvent = null
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue