2018-10-12 16:42:54 +02:00
|
|
|
<template>
|
2018-10-13 19:14:58 +02:00
|
|
|
<div>
|
2018-11-05 22:28:59 +01:00
|
|
|
<div id="profile" v-if="Username">
|
2018-10-13 19:14:58 +02:00
|
|
|
<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-11-05 22:28:59 +01:00
|
|
|
<span class="text-white"> {{ Username }} </span>
|
2018-10-13 19:14:58 +02:00
|
|
|
<hr>
|
2018-11-05 22:28:59 +01:00
|
|
|
<span class="text-white" v-if="Verificato"> {{$t('reg.verificato')}} </span>
|
2018-10-26 22:25:35 +02:00
|
|
|
<span class="text-white" v-else> {{$t('reg.non_verificato')}} </span>
|
|
|
|
|
<span class="text-white"> {{ getEmail }} </span>
|
2018-10-13 19:14:58 +02:00
|
|
|
</div>
|
|
|
|
|
<div id="user-actions">
|
2018-10-26 22:25:35 +02:00
|
|
|
<q-btn round color="primary" icon="person"></q-btn>
|
|
|
|
|
<q-btn round color="warning" icon="lock"></q-btn>
|
|
|
|
|
<q-btn round color="secondary" icon="exit_to_app" @click='logoutHandler'></q-btn>
|
2018-10-13 19:14:58 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2018-11-05 22:28:59 +01:00
|
|
|
<menu-one v-if="MenuCollapse" :links="links"></menu-one>
|
2018-10-13 19:14:58 +02:00
|
|
|
<menu-two v-else :links="links"></menu-two>
|
|
|
|
|
|
|
|
|
|
<div class="fixed-bottom text-center light text-italic">
|
2018-10-26 22:25:35 +02:00
|
|
|
Powered by Perseo
|
2018-10-13 19:14:58 +02:00
|
|
|
</div>
|
2018-10-12 16:42:54 +02:00
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
2018-11-05 22:28:59 +01:00
|
|
|
|
|
|
|
|
<script type="ts">
|
2018-10-12 16:42:54 +02:00
|
|
|
import menuOne from './menuOne.vue'
|
|
|
|
|
import menuTwo from './menuTwo.vue'
|
2018-10-26 22:25:35 +02:00
|
|
|
|
2018-11-05 22:28:59 +01:00
|
|
|
import { Component, Vue, Watch, Prop } from 'vue-property-decorator'
|
2018-11-15 19:48:37 +01:00
|
|
|
import { GlobModule } from '../../store/Modules/glob'
|
|
|
|
|
import { UserModule } from '../../store/Modules/user';
|
2018-11-05 22:28:59 +01:00
|
|
|
|
|
|
|
|
@Component({
|
2018-10-12 16:42:54 +02:00
|
|
|
components: {
|
|
|
|
|
menuOne,
|
|
|
|
|
menuTwo
|
|
|
|
|
}
|
2018-11-05 22:28:59 +01:00
|
|
|
})
|
|
|
|
|
export default class Drawer extends Vue {
|
|
|
|
|
photo = ''
|
|
|
|
|
user = null
|
|
|
|
|
links = {
|
|
|
|
|
Dashboard: {
|
|
|
|
|
routes: [
|
|
|
|
|
{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'},
|
|
|
|
|
],
|
|
|
|
|
show: true
|
|
|
|
|
},
|
|
|
|
|
Forms: {
|
|
|
|
|
routes: [
|
|
|
|
|
{route: '/prec', faIcon: 'fa fa-search', materialIcon: 'search', name: 'Prec'},
|
|
|
|
|
{route: '/simpleform', faIcon: 'fa fa-search', materialIcon: 'search', name: 'Simpleform'},
|
|
|
|
|
{route: '/embeeded', faIcon: 'fa fa-check', materialIcon: 'check', name: 'Embeeded validations'},
|
|
|
|
|
//{ route: '/advanced-form-one', faIcon: 'fa fa-hdd-o', materialIcon: 'filter_1', name: 'Adv. Form One' }
|
|
|
|
|
],
|
|
|
|
|
show: false
|
|
|
|
|
},
|
|
|
|
|
Pages: {
|
|
|
|
|
routes: [
|
|
|
|
|
{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' }
|
|
|
|
|
],
|
|
|
|
|
show: false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get MenuCollapse () {
|
|
|
|
|
return GlobModule.menuCollapse
|
|
|
|
|
}
|
|
|
|
|
get Username () {
|
|
|
|
|
return UserModule.username
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get Verificato () {
|
|
|
|
|
return UserModule.verifiedEmail
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
logoutHandler() {
|
|
|
|
|
this.logout({ router: this.$router })
|
|
|
|
|
this.$q.notify(this.$t('logout.uscito'))
|
|
|
|
|
}
|
2018-10-12 16:42:54 +02:00
|
|
|
}
|
|
|
|
|
</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>
|