Fix navbar and login view

This commit is contained in:
aldrin 2021-04-16 10:36:52 +02:00
parent dde639f3d1
commit 6e4c2ddabd
5 changed files with 49 additions and 16 deletions

View file

@ -1,7 +1,13 @@
<template>
<section class="container">
<div class="columns is-centered">
<div class="column is-5-widescreen is-4-desktop is-5-tablet">
<div
v-if="user.isAuthenticated"
class="column is-3-widescreen is-4-desktop is-5-tablet"
>
<UserTable :user="user" />
</div>
<div v-else class="column is-3-widescreen is-4-desktop is-5-tablet">
<b-notification
v-if="isConfirmation"
type="is-success"
@ -10,7 +16,6 @@
Deine E-Mail-Adresse wurde erfolgreich bestätigt. Du kannst dich nun
anmelden.
</b-notification>
<UserTable v-if="user.isAuthenticated" :user="user" />
<LoginForm v-else :user="user" />
</div>
</div>
@ -28,8 +33,8 @@ export default class Home extends Vue {
private isConfirmation = false;
private user = new User();
private async created() {
if (this.$route.name === "Confirm") this.isConfirmation = true;
public async created(): Promise<void> {
if (this.$route.name === "confirm") this.isConfirmation = true;
if (this.isConfirmation) {
await User.confirm(this.$route.params.uid, this.$route.params.token);
}