Skip to content
Snippets Groups Projects
ValidationEmail.vue 1.67 KiB
Newer Older
<template>
  <div>
    <div class="app-header">
Florent Lavelle's avatar
Florent Lavelle committed
      <img alt="logo" :src="logoPath"/>
    </div>
    <div class="center">
      <b-container class="msg" v-if="status">
        <p>
Florent Lavelle's avatar
Florent Lavelle committed
          {{ $t('validationEmail.message') }}
        </p>
        <b-button
          type="button"
          variant="outline-primary"
          data-test="validationEmail-signIn"
          @click.prevent="$router.push({ name: 'SignIn' })"
        >
Florent Lavelle's avatar
Florent Lavelle committed
          {{ $t('validationEmail.goToLogin') }}
        </b-button>
      </b-container>
      <b-container class="msg" v-else>
        <p>
Florent Lavelle's avatar
Florent Lavelle committed
          {{ $t('validationEmail.error') }}
        </p>
      </b-container>
    </div>
    <small class="footer">
Florent Lavelle's avatar
Florent Lavelle committed
      <p>{{ $t('footer') }} <a href="https://www.neogeo.fr/" target="_blank" rel="noopener">Neogeo-Technologies</a></p>
    </small>
  </div>
</template>

<script>

import {
  mapState,
  mapActions,
} from 'vuex';

export default {
  name: 'ValidationEmail',
  data: () => {
    return {
    };
  },
  computed: {
    ...mapState('validation-email', [
      'status'
Florent Lavelle's avatar
Florent Lavelle committed
    ]),

    logoPath() {
      return require(process.env.VUE_APP_LOGO);
    }
  },
  created() {
    this.POST_TOKEN(this.$route.query.token);
  },
  methods: {
    ...mapActions('validation-email', [
      'POST_TOKEN'
    ])
  }
};
</script>

<style lang="less" scoped>

.center {
  position: initial;
}

.center .msg.container {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.center .msg.container,
.center .msg.container button {
  font-size: large;
}

.footer {
  position: absolute;
  bottom: 0;
  font-size: small;
}

.footer a {
  text-decoration: none;
}
</style>