fix(activities): buy-tickets login toast gets a Log in action button

Matches the pattern already used by BookmarkButton, RSVPButton, and
ActivitiesFavoritesPage — the auth-prompt toast carries an inline
"Log in" action that pushes /login. The buy-tickets toast was the
odd one out, leaving the buyer to find the login route themselves.

Also lifts the message + button label into i18n
(activities.detail.loginToBuyTickets, .logIn) so es/fr aren't
English-on-top.
This commit is contained in:
Padreug 2026-05-25 11:56:11 +02:00
commit f92d4090dd
5 changed files with 14 additions and 1 deletions

View file

@ -107,6 +107,8 @@ const messages: LocaleMessages = {
viewMyTickets: 'View in My Tickets', viewMyTickets: 'View in My Tickets',
soldOut: 'Sold Out', soldOut: 'Sold Out',
pastEvent: 'This event has already happened', pastEvent: 'This event has already happened',
loginToBuyTickets: 'Log in to buy tickets',
logIn: 'Log in',
free: 'Free', free: 'Free',
}, },
tickets: { tickets: {

View file

@ -107,6 +107,8 @@ const messages: LocaleMessages = {
viewMyTickets: 'Ver en Mis boletos', viewMyTickets: 'Ver en Mis boletos',
soldOut: 'Agotado', soldOut: 'Agotado',
pastEvent: 'Este evento ya pasó', pastEvent: 'Este evento ya pasó',
loginToBuyTickets: 'Inicia sesión para comprar boletos',
logIn: 'Iniciar sesión',
free: 'Gratis', free: 'Gratis',
}, },
tickets: { tickets: {

View file

@ -107,6 +107,8 @@ const messages: LocaleMessages = {
viewMyTickets: 'Voir dans Mes billets', viewMyTickets: 'Voir dans Mes billets',
soldOut: 'Épuisé', soldOut: 'Épuisé',
pastEvent: 'Cet événement est déjà passé', pastEvent: 'Cet événement est déjà passé',
loginToBuyTickets: 'Connectez-vous pour acheter des billets',
logIn: 'Connexion',
free: 'Gratuit', free: 'Gratuit',
}, },
tickets: { tickets: {

View file

@ -82,6 +82,8 @@ export interface LocaleMessages {
viewMyTickets: string viewMyTickets: string
soldOut: string soldOut: string
pastEvent: string pastEvent: string
loginToBuyTickets: string
logIn: string
free: string free: string
} }
tickets: { tickets: {

View file

@ -145,7 +145,12 @@ const showPurchaseDialog = ref(false)
function openPurchaseDialog() { function openPurchaseDialog() {
if (!isAuthenticated.value) { if (!isAuthenticated.value) {
toastService.info('Log in to buy tickets') toastService.info(t('activities.detail.loginToBuyTickets'), {
action: {
label: t('activities.detail.logIn'),
onClick: () => router.push('/login'),
},
})
return return
} }
showPurchaseDialog.value = true showPurchaseDialog.value = true