This repository has been archived on 2022-05-05. You can view files and clone it, but cannot push or open issues or pull requests.
userausfall/src/App.vue

25 lines
593 B
Vue

<template>
<div id="app">
<navbar />
<section class="container">
<div class="columns is-centered">
<router-view />
</div>
</section>
</div>
</template>
<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import Navbar from "@/components/Navbar.vue";
import { user } from "@/api";
@Component({ components: { Navbar } })
export default class App extends Vue {
public async created(): Promise<void> {
if (!user.isAuthenticated && this.$route.name !== "login") {
this.$router.push({ name: "login" });
}
}
}
</script>