Fix: Finalize AuthGuard translations, registration link, and restricted offers on map
This commit is contained in:
@ -22,7 +22,7 @@ const router = useRouter()
|
||||
const { t } = useI18n()
|
||||
|
||||
function goToRegister() {
|
||||
router.push('/register')
|
||||
router.push({ path: '/login', query: { mode: 'register' } })
|
||||
}
|
||||
|
||||
function goToLogin() {
|
||||
|
||||
@ -11,7 +11,11 @@
|
||||
</button>
|
||||
</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">
|
||||
<button class="sheet-nav" @click="$emit('prev')" :disabled="coupons.length < 2">
|
||||
<span class="material-icons">chevron_left</span>
|
||||
@ -44,6 +48,7 @@
|
||||
<span class="material-icons">chevron_right</span>
|
||||
</button>
|
||||
</div>
|
||||
</AuthGuard>
|
||||
|
||||
<!-- Dots -->
|
||||
<div class="sheet-dots" v-if="coupons.length > 1">
|
||||
@ -63,6 +68,7 @@
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { getImageUrl } from '@/utils/imageUrl'
|
||||
import AuthGuard from '@/components/common/AuthGuard.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
isOpen: boolean
|
||||
|
||||
@ -148,7 +148,11 @@
|
||||
"active": "Active",
|
||||
"offersCount": "{count} offer | {count} offers",
|
||||
"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": {
|
||||
"title": "Transport Hub",
|
||||
@ -196,7 +200,11 @@
|
||||
"contactOperator": "Contact the operator directly to confirm availability.",
|
||||
"bookWhatsapp": "Book via WhatsApp",
|
||||
"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": {
|
||||
"loadingDetails": "Loading bus stop details...",
|
||||
@ -237,6 +245,10 @@
|
||||
"commerce": "Commerce",
|
||||
"tourism": "Tourism",
|
||||
"drinks": "Drinks"
|
||||
},
|
||||
"auth": {
|
||||
"title": "Exclusive places!",
|
||||
"message": "To discover Chiriquí register or log in. Find the best hidden gems and direct offers."
|
||||
}
|
||||
},
|
||||
"business": {
|
||||
@ -314,7 +326,8 @@
|
||||
"passMin8": "Minimum 8 characters",
|
||||
"smartLocation": "Allow to detect my location automatically (Smart Location)",
|
||||
"emailRegistered": "Email is already registered.",
|
||||
"invalidCreds": "Incorrect email or password."
|
||||
"invalidCreds": "Incorrect email or password.",
|
||||
"loginLink": "Already have an account, log in"
|
||||
},
|
||||
"routesView": {
|
||||
"title": "Transport",
|
||||
|
||||
@ -150,7 +150,11 @@
|
||||
"active": "Activo",
|
||||
"offersCount": "{count} oferta | {count} ofertas",
|
||||
"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": {
|
||||
"title": "Centro de Transporte",
|
||||
@ -198,7 +202,11 @@
|
||||
"contactOperator": "Contacta directamente al operador para confirmar disponibilidad.",
|
||||
"bookWhatsapp": "Reservar por WhatsApp",
|
||||
"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": {
|
||||
"loadingDetails": "Cargando detalles de la parada...",
|
||||
@ -239,6 +247,10 @@
|
||||
"commerce": "Comercio",
|
||||
"tourism": "Turismo",
|
||||
"drinks": "Bebidas"
|
||||
},
|
||||
"auth": {
|
||||
"title": "¡Locales exclusivos!",
|
||||
"message": "Para descubrir Chiriquí regístrate o accede. Encuentra los mejores rincones y ofertas directas."
|
||||
}
|
||||
},
|
||||
"business": {
|
||||
@ -318,7 +330,8 @@
|
||||
"passMin8": "Mínimo 8 caracteres",
|
||||
"smartLocation": "Permitir detectar mi ubicación automáticamente (Smart Location)",
|
||||
"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": {
|
||||
"title": "Transporte",
|
||||
|
||||
@ -12,6 +12,11 @@ const mounted = ref(false)
|
||||
|
||||
onMounted(() => {
|
||||
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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user