From f92d4090dd26565afb4870c79e835e26ca3507f5 Mon Sep 17 00:00:00 2001 From: Padreug Date: Mon, 25 May 2026 11:56:11 +0200 Subject: [PATCH] fix(activities): buy-tickets login toast gets a Log in action button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/i18n/locales/en.ts | 2 ++ src/i18n/locales/es.ts | 2 ++ src/i18n/locales/fr.ts | 2 ++ src/i18n/types.ts | 2 ++ src/modules/activities/views/ActivityDetailPage.vue | 7 ++++++- 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index b72b5fc..3d0bcfa 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -107,6 +107,8 @@ const messages: LocaleMessages = { viewMyTickets: 'View in My Tickets', soldOut: 'Sold Out', pastEvent: 'This event has already happened', + loginToBuyTickets: 'Log in to buy tickets', + logIn: 'Log in', free: 'Free', }, tickets: { diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index 4d57c91..5da3f51 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -107,6 +107,8 @@ const messages: LocaleMessages = { viewMyTickets: 'Ver en Mis boletos', soldOut: 'Agotado', pastEvent: 'Este evento ya pasó', + loginToBuyTickets: 'Inicia sesión para comprar boletos', + logIn: 'Iniciar sesión', free: 'Gratis', }, tickets: { diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts index 3c429ad..96d002d 100644 --- a/src/i18n/locales/fr.ts +++ b/src/i18n/locales/fr.ts @@ -107,6 +107,8 @@ const messages: LocaleMessages = { viewMyTickets: 'Voir dans Mes billets', soldOut: 'Épuisé', pastEvent: 'Cet événement est déjà passé', + loginToBuyTickets: 'Connectez-vous pour acheter des billets', + logIn: 'Connexion', free: 'Gratuit', }, tickets: { diff --git a/src/i18n/types.ts b/src/i18n/types.ts index 05c7282..77585f0 100644 --- a/src/i18n/types.ts +++ b/src/i18n/types.ts @@ -82,6 +82,8 @@ export interface LocaleMessages { viewMyTickets: string soldOut: string pastEvent: string + loginToBuyTickets: string + logIn: string free: string } tickets: { diff --git a/src/modules/activities/views/ActivityDetailPage.vue b/src/modules/activities/views/ActivityDetailPage.vue index 5c89564..38682f5 100644 --- a/src/modules/activities/views/ActivityDetailPage.vue +++ b/src/modules/activities/views/ActivityDetailPage.vue @@ -145,7 +145,12 @@ const showPurchaseDialog = ref(false) function openPurchaseDialog() { 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 } showPurchaseDialog.value = true