MainHeader.vue 844 Bytes
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
<template>
<b-navbar variant="white" class="bottom-shadow mb-3">
<b-button variant="none" class="no-outline" @click="$store.dispatch('ui/toggle', 'sidebarShow')">
<fa icon="bars" />
</b-button>
<!-- Right aligned nav items -->
<!-- <b-navbar-nav class="ml-auto">-->
<!-- <b-nav-item @click="logout">-->
<!-- <fa icon="sign-out-alt" />-->
<!-- </b-nav-item>-->
<!-- </b-navbar-nav>-->
</b-navbar>
</template>

<script>
export default {
name: 'MainHeader',
methods: {
async logout () {
await this.$store.dispatch('auth/logout')
this.$router.push({ name: 'login' })
}
}
}
</script>

<style scoped>
.bottom-shadow {
box-shadow: 0 4px 2px -2px gray;
}
.no-outline:focus, .no-outline:active {
outline: none !important;
box-shadow: none !important;
}
</style>