Fix: Finalize AuthGuard translations, registration link, and restricted offers on map

This commit is contained in:
2026-03-03 12:02:26 -05:00
parent b098c23291
commit a9adc4c4a0
5 changed files with 72 additions and 35 deletions

View File

@ -22,7 +22,7 @@ const router = useRouter()
const { t } = useI18n() const { t } = useI18n()
function goToRegister() { function goToRegister() {
router.push('/register') router.push({ path: '/login', query: { mode: 'register' } })
} }
function goToLogin() { function goToLogin() {

View File

@ -11,7 +11,11 @@
</button> </button>
</div> </div>
<!-- Card area with nav arrows --> <!-- Card area with nav arrows wrapped in AuthGuard -->
<AuthGuard
:title="t('coupons.auth.title') || 'Ofertas Exclusivas'"
:message="t('coupons.auth.message') || 'Regístrate para ver todos los detalles de esta promoción y canjear tu código.'"
>
<div class="sheet-card-area"> <div class="sheet-card-area">
<button class="sheet-nav" @click="$emit('prev')" :disabled="coupons.length < 2"> <button class="sheet-nav" @click="$emit('prev')" :disabled="coupons.length < 2">
<span class="material-icons">chevron_left</span> <span class="material-icons">chevron_left</span>
@ -44,6 +48,7 @@
<span class="material-icons">chevron_right</span> <span class="material-icons">chevron_right</span>
</button> </button>
</div> </div>
</AuthGuard>
<!-- Dots --> <!-- Dots -->
<div class="sheet-dots" v-if="coupons.length > 1"> <div class="sheet-dots" v-if="coupons.length > 1">
@ -63,6 +68,7 @@
import { computed } from 'vue' import { computed } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { getImageUrl } from '@/utils/imageUrl' import { getImageUrl } from '@/utils/imageUrl'
import AuthGuard from '@/components/common/AuthGuard.vue'
const props = defineProps<{ const props = defineProps<{
isOpen: boolean isOpen: boolean

View File

@ -148,7 +148,11 @@
"active": "Active", "active": "Active",
"offersCount": "{count} offer | {count} offers", "offersCount": "{count} offer | {count} offers",
"viewDetails": "View details", "viewDetails": "View details",
"restaurant": "Restaurant" "restaurant": "Restaurant",
"auth": {
"title": "Exclusive Offers",
"message": "To view the details of this promotion, get your discount code and save on your purchases, register or log in now."
}
}, },
"taxi": { "taxi": {
"title": "Transport Hub", "title": "Transport Hub",
@ -196,7 +200,11 @@
"contactOperator": "Contact the operator directly to confirm availability.", "contactOperator": "Contact the operator directly to confirm availability.",
"bookWhatsapp": "Book via WhatsApp", "bookWhatsapp": "Book via WhatsApp",
"callOperator": "Call Operator", "callOperator": "Call Operator",
"errorLoading": "Could not load trip information" "errorLoading": "Could not load trip information",
"auth": {
"title": "Explore Chiriquí without limits",
"message": "Register to book your trips, see detailed schedules and access exclusive group rates."
}
}, },
"busStop": { "busStop": {
"loadingDetails": "Loading bus stop details...", "loadingDetails": "Loading bus stop details...",
@ -237,6 +245,10 @@
"commerce": "Commerce", "commerce": "Commerce",
"tourism": "Tourism", "tourism": "Tourism",
"drinks": "Drinks" "drinks": "Drinks"
},
"auth": {
"title": "Exclusive places!",
"message": "To discover Chiriquí register or log in. Find the best hidden gems and direct offers."
} }
}, },
"business": { "business": {
@ -314,7 +326,8 @@
"passMin8": "Minimum 8 characters", "passMin8": "Minimum 8 characters",
"smartLocation": "Allow to detect my location automatically (Smart Location)", "smartLocation": "Allow to detect my location automatically (Smart Location)",
"emailRegistered": "Email is already registered.", "emailRegistered": "Email is already registered.",
"invalidCreds": "Incorrect email or password." "invalidCreds": "Incorrect email or password.",
"loginLink": "Already have an account, log in"
}, },
"routesView": { "routesView": {
"title": "Transport", "title": "Transport",

View File

@ -150,7 +150,11 @@
"active": "Activo", "active": "Activo",
"offersCount": "{count} oferta | {count} ofertas", "offersCount": "{count} oferta | {count} ofertas",
"viewDetails": "Ver detalles", "viewDetails": "Ver detalles",
"restaurant": "Restaurante" "restaurant": "Restaurante",
"auth": {
"title": "Ofertas Exclusivas",
"message": "Para ver los detalles de esta promoción, obtener tu código de descuento y ahorrar en tus compras, regístrate o accede ahora."
}
}, },
"taxi": { "taxi": {
"title": "Centro de Transporte", "title": "Centro de Transporte",
@ -198,7 +202,11 @@
"contactOperator": "Contacta directamente al operador para confirmar disponibilidad.", "contactOperator": "Contacta directamente al operador para confirmar disponibilidad.",
"bookWhatsapp": "Reservar por WhatsApp", "bookWhatsapp": "Reservar por WhatsApp",
"callOperator": "Llamar al Operador", "callOperator": "Llamar al Operador",
"errorLoading": "No se pudo cargar la información del viaje" "errorLoading": "No se pudo cargar la información del viaje",
"auth": {
"title": "Explora Chiriquí sin límites",
"message": "Regístrate para reservar tus viajes, ver horarios detallados y acceder a tarifas grupales exclusivas."
}
}, },
"busStop": { "busStop": {
"loadingDetails": "Cargando detalles de la parada...", "loadingDetails": "Cargando detalles de la parada...",
@ -239,6 +247,10 @@
"commerce": "Comercio", "commerce": "Comercio",
"tourism": "Turismo", "tourism": "Turismo",
"drinks": "Bebidas" "drinks": "Bebidas"
},
"auth": {
"title": "¡Locales exclusivos!",
"message": "Para descubrir Chiriquí regístrate o accede. Encuentra los mejores rincones y ofertas directas."
} }
}, },
"business": { "business": {
@ -318,7 +330,8 @@
"passMin8": "Mínimo 8 caracteres", "passMin8": "Mínimo 8 caracteres",
"smartLocation": "Permitir detectar mi ubicación automáticamente (Smart Location)", "smartLocation": "Permitir detectar mi ubicación automáticamente (Smart Location)",
"emailRegistered": "El correo ya está registrado.", "emailRegistered": "El correo ya está registrado.",
"invalidCreds": "Correo o contraseña incorrectos." "invalidCreds": "Correo o contraseña incorrectos.",
"loginLink": "Ya tengo cuenta, iniciar sesión"
}, },
"routesView": { "routesView": {
"title": "Transporte", "title": "Transporte",

View File

@ -12,6 +12,11 @@ const mounted = ref(false)
onMounted(() => { onMounted(() => {
mounted.value = true mounted.value = true
// Check if we should start in register mode
const mode = router.currentRoute.value.query.mode
if (mode === 'register') {
isLogin.value = false
}
}) })
const toggleAuth = () => { const toggleAuth = () => {