Skip to content
Permalink
9d6a4b9d6a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
60 lines (53 sloc) 1.19 KB
<template>
<div id="app">
<div class="col-md-3" >
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link> |
<router-link to="/login" v-if="!authenticated">Log in</router-link>
<a href="#" v-if="authenticated" @click="$store.dispatch('signOut')">Log out</a>
</div>
</div>
<div class="col-md-9">
<router-view/>
</div>
</div>
</template>
<script>
import Vue from 'vue'
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
Vue.use(BootstrapVue)
Vue.use(IconsPlugin)
export default {
name: 'app',
computed: {
authenticated(){
return this.$store.getters.isAuthenticated;
}
},
mounted() {
// console.log(this.authenticated);
}
}
</script>
<style lang="scss">
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
#nav {
padding: 30px;
display:flex;
flex-direction: column;
a {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #0d5c9c;
}
}
}
</style>