2018-10-12 16:42:54 +02:00
|
|
|
<template>
|
2018-10-13 19:14:58 +02:00
|
|
|
<div>
|
|
|
|
|
<div id="profile">
|
|
|
|
|
<img :src="photo" style='height: 80px' class="inline-block">
|
|
|
|
|
<img src="../img/avatar-1.svg" id="avatar" class="inline-block">
|
|
|
|
|
<div id="user-name">
|
2018-10-26 00:30:10 +02:00
|
|
|
<span class="text-white"> Username: {{ getUsername }} </span>
|
2018-10-13 19:14:58 +02:00
|
|
|
<hr>
|
|
|
|
|
<span class="text-white"> {{ email }} </span>
|
|
|
|
|
<hr>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="user-actions">
|
|
|
|
|
<button class="bordered blue small"><i>person</i></button>
|
|
|
|
|
<button class="bordered blue small"><i>lock</i></button>
|
|
|
|
|
<button class="bordered blue small" @click='logOut'><i>exit_to_app</i></button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<menu-one v-if="getMenuCollapse" :links="links"></menu-one>
|
|
|
|
|
<menu-two v-else :links="links"></menu-two>
|
|
|
|
|
|
|
|
|
|
<div class="fixed-bottom text-center light text-italic">
|
|
|
|
|
Powered by
|
|
|
|
|
<a href="https://vuejs.org/"><img src="../img/vue-logo.png" alt=""></a>
|
|
|
|
|
<a href="http://quasar-framework.org/"><img src="../img/quasar-logo.png" alt=""></a>
|
|
|
|
|
</div>
|
2018-10-12 16:42:54 +02:00
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script type="text/javascript">
|
2018-10-13 19:14:58 +02:00
|
|
|
import {mapGetters} from 'vuex'
|
2018-10-12 16:42:54 +02:00
|
|
|
import menuOne from './menuOne.vue'
|
|
|
|
|
import menuTwo from './menuTwo.vue'
|
|
|
|
|
//import firebase from 'firebase'
|
|
|
|
|
|
|
|
|
|
export default {
|
2018-10-13 19:14:58 +02:00
|
|
|
data() {
|
2018-10-12 16:42:54 +02:00
|
|
|
return {
|
|
|
|
|
photo: '',
|
|
|
|
|
userId: '',
|
|
|
|
|
name: '',
|
|
|
|
|
email: '',
|
|
|
|
|
user: {},
|
|
|
|
|
links: {
|
|
|
|
|
Dashboard: {
|
|
|
|
|
routes: [
|
2018-10-13 19:14:58 +02:00
|
|
|
{route: '/', faIcon: 'fa fa-home', materialIcon: 'home', name: 'Dashboard One'},
|
|
|
|
|
{route: '/signup', faIcon: 'fa fa-signup', materialIcon: 'login', name: 'SignUp'},
|
|
|
|
|
{route: '/signin', faIcon: 'fa fa-login', materialIcon: 'login', name: 'Login'},
|
2018-10-12 16:42:54 +02:00
|
|
|
],
|
|
|
|
|
show: true
|
|
|
|
|
},
|
|
|
|
|
Forms: {
|
|
|
|
|
routes: [
|
2018-10-13 19:14:58 +02:00
|
|
|
{route: '/prec', faIcon: 'fa fa-search', materialIcon: 'search', name: 'Prec'},
|
2018-10-12 16:42:54 +02:00
|
|
|
{ route: '/embeeded', faIcon: 'fa fa-check', materialIcon: 'check', name: 'Embeeded validations' },
|
2018-10-13 19:14:58 +02:00
|
|
|
//{ route: '/advanced-form-one', faIcon: 'fa fa-hdd-o', materialIcon: 'filter_1', name: 'Adv. Form One' }
|
2018-10-12 16:42:54 +02:00
|
|
|
],
|
|
|
|
|
show: false
|
|
|
|
|
},
|
|
|
|
|
Pages: {
|
|
|
|
|
routes: [
|
2018-10-13 19:14:58 +02:00
|
|
|
{route: '/login', faIcon: 'fa fa-unlock-alt', materialIcon: 'lock_open', name: 'Login'},
|
|
|
|
|
//{ route: '/pricing', faIcon: 'fa fa-money', materialIcon: 'attach_money', name: 'Pricing' },
|
|
|
|
|
//{ route: '/drag-and-drop', faIcon: 'fa fa-arrows', materialIcon: 'move_to_inbox', name: 'Drag and Drop' },
|
|
|
|
|
//{ route: '/server-side-data-table', faIcon: 'fa fa-list-alt', materialIcon: 'list_compact', name: 'Server Side Data Table' }
|
2018-10-12 16:42:54 +02:00
|
|
|
],
|
|
|
|
|
show: false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2018-10-13 19:14:58 +02:00
|
|
|
created() {
|
|
|
|
|
console.log("CREA DRAWER!!!!!!!!")
|
2018-10-12 16:42:54 +02:00
|
|
|
var vm = this
|
|
|
|
|
/*firebase.auth().onAuthStateChanged(function (user) {
|
|
|
|
|
if (user) {
|
|
|
|
|
vm.user = user
|
|
|
|
|
vm.name = vm.user.displayName
|
|
|
|
|
vm.email = vm.user.email
|
|
|
|
|
vm.photo = vm.user.photoURL
|
|
|
|
|
vm.userId = vm.user.uid
|
|
|
|
|
}
|
|
|
|
|
})*/
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2018-10-13 19:14:58 +02:00
|
|
|
logOut() {
|
2018-10-12 16:42:54 +02:00
|
|
|
//firebase.auth().signOut()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
2018-10-26 00:30:10 +02:00
|
|
|
...mapGetters("glob", ['getLayoutNeeded', 'getMenuCollapse']),
|
|
|
|
|
...mapGetters("user", ['getUsername'])
|
2018-10-12 16:42:54 +02:00
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
menuOne,
|
|
|
|
|
menuTwo
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped>
|
2018-10-13 19:14:58 +02:00
|
|
|
.fixed-bottom {
|
|
|
|
|
margin-bottom: 1%;
|
|
|
|
|
}
|
2018-10-12 16:42:54 +02:00
|
|
|
|
2018-10-13 19:14:58 +02:00
|
|
|
.fixed-bottom a img {
|
|
|
|
|
width: 25px;
|
|
|
|
|
height: 25px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#avatar {
|
|
|
|
|
padding: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#profile {
|
|
|
|
|
height: 130px;
|
|
|
|
|
background-color: #009688;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#user-name {
|
|
|
|
|
left: 90px;
|
|
|
|
|
bottom: 77px;
|
|
|
|
|
position: relative;
|
|
|
|
|
width: 159px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#user-actions {
|
|
|
|
|
left: 90px;
|
|
|
|
|
bottom: 71px;
|
|
|
|
|
position: relative;
|
|
|
|
|
width: 171px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#menu-collapse {
|
|
|
|
|
margin-top: 5%;
|
|
|
|
|
}
|
2018-10-12 16:42:54 +02:00
|
|
|
</style>
|