Commit 716ef77c authored by rene's avatar rene
Browse files

agregar integración a telegram

parent ed5ca2b2
......@@ -18,7 +18,16 @@
<li>
<router-link to="/codigoDeConducta">Código de conducta</router-link>
</li>
<li><router-link to="/cerrarSesion">Cerrar sesion (!)</router-link></li>
<template v-if="loggedIn">
<li>
<router-link to="/vincularATelegram"
>Vincular a Telegram</router-link
>
</li>
<li>
<router-link to="/cerrarSesion">Cerrar sesion (!)</router-link>
</li>
</template>
<li><router-link to="/licencia">licencia del proyecto</router-link></li>
</ul>
<!--<div class="bottom">
......
......@@ -7,6 +7,7 @@ import Home from './views/Home.vue'
import CrearCuenta from './views/CrearCuenta.vue'
import CodigoDeConducta from './views/CodigoDeConducta.vue'
import IniciarSesion from './views/IniciarSesion.vue'
import VincularTelegram from './views/VincularTelegram.vue'
import CerrarSesion from './views/CerrarSesion.vue'
import Barcas from './views/Barcas.vue'
import Barca from './views/Barca.vue'
......@@ -40,6 +41,12 @@ const router = new Router({
component: IniciarSesion,
meta: { fullScreen: true },
},
{
path: '/vincularATelegram',
name: 'vincular a telegram',
component: VincularTelegram,
meta: { requiresAuth: true },
},
{
path: '/cerrarSesion',
name: 'cerrar sesion',
......
<template>
<div class="vincular-telegram">
<h3>Redirigiendo...</h3>
<p>
Si tu navegador no te redirige,
<a :href="telegramUrl" target="_blank" rel="noopener noreferrer"
>hacé click acá</a
>.
</p>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'VincularTelegramView',
computed: {
...mapState({
telegramUrl(state) {
return state.profile.telegram_url
},
}),
},
mounted() {
if (this.$route.query.directo) location.href = this.telegramUrl
else window.open(this.telegramUrl, '_blank')
},
}
</script>
<style lang="scss" scoped>
.vincular-telegram {
margin: 0 20px;
}
</style>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment