login create and change version
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-nav vertical class="mt-3">
|
||||
<b-nav-item class="m-2">
|
||||
<div class="accordion" role="tablist">
|
||||
<b-card no-body >
|
||||
<b-card-header header-tag="header" role="tab">
|
||||
<b-button block squared v-b-toggle.user class="p-1 azulUnam">
|
||||
<b-icon icon="person-fill" style="margin-bottom: 4px;"></b-icon>
|
||||
{{user}}
|
||||
</b-button>
|
||||
</b-card-header>
|
||||
<b-collapse id="user" accordion="my-accordion" role="tabpanel">
|
||||
<b-card-body>
|
||||
<b-button block variant="light" class="p-1 m-0 rojo" @click="cerrarSesion()">Cerrar sesión</b-button>
|
||||
</b-card-body>
|
||||
</b-collapse>
|
||||
</b-card>
|
||||
</div>
|
||||
|
||||
</b-nav-item>
|
||||
<b-nav-item class="m-2">
|
||||
<div class="accordion" role="tablist">
|
||||
<b-card no-body >
|
||||
@@ -32,6 +50,19 @@
|
||||
</b-nav>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props:{
|
||||
user: String
|
||||
},
|
||||
methods:{
|
||||
cerrarSesion(){
|
||||
localStorage.clear();
|
||||
this.$router.replace('/login')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped>
|
||||
@@ -43,6 +74,9 @@
|
||||
.azulUnam {
|
||||
background-color: #1e3c70;
|
||||
}
|
||||
|
||||
.rojo:hover{
|
||||
background-color: #CA230C;
|
||||
color: white;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user