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>
|
2019-01-02 18:01:36 +01:00
|
|
|
<span class="text-white background-red" v-else> {{$t('reg.non_verificato')}} </span>
|
|
|
|
|
<!-- <span class="text-white"> {{ Email }} </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-12-26 21:02:16 +01:00
|
|
|
<menu-one :links="links"></menu-one>
|
2018-10-13 19:14:58 +02:00
|
|
|
|
2019-01-05 20:11:41 +01:00
|
|
|
<!--<footer>
|
|
|
|
|
<small>- Small</small>
|
|
|
|
|
</footer>-->
|
|
|
|
|
|
2018-10-13 19:14:58 +02:00
|
|
|
<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
|
|
|
|
2018-11-26 00:53:05 +01:00
|
|
|
<script lang="ts">
|
2018-10-12 16:42:54 +02:00
|
|
|
import menuOne from './menuOne.vue'
|
2018-10-26 22:25:35 +02:00
|
|
|
|
2018-11-26 00:53:05 +01:00
|
|
|
import Vue from 'vue'
|
|
|
|
|
import { Component, Watch, Prop } from 'vue-property-decorator'
|
2019-01-05 20:11:41 +01:00
|
|
|
import { Store } from 'vuex'
|
|
|
|
|
import { UserStore } from '@modules'
|
2018-11-26 00:53:05 +01:00
|
|
|
import { GlobalStore } from '@modules'
|
|
|
|
|
|
2018-11-05 22:28:59 +01:00
|
|
|
|
|
|
|
|
@Component({
|
2018-10-12 16:42:54 +02:00
|
|
|
components: {
|
|
|
|
|
menuOne,
|
|
|
|
|
}
|
2018-11-05 22:28:59 +01:00
|
|
|
})
|
|
|
|
|
export default class Drawer extends Vue {
|
2018-11-26 00:53:05 +01:00
|
|
|
public $q
|
2019-01-05 20:11:41 +01:00
|
|
|
$t: any
|
2018-12-26 21:02:16 +01:00
|
|
|
|
2019-01-05 20:11:41 +01:00
|
|
|
created() {
|
2018-12-26 21:02:16 +01:00
|
|
|
console.log('Drawer created...')
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-05 22:28:59 +01:00
|
|
|
photo = ''
|
|
|
|
|
user = null
|
|
|
|
|
links = {
|
|
|
|
|
Dashboard: {
|
|
|
|
|
routes: [
|
2019-01-05 20:11:41 +01:00
|
|
|
{ route: '/', faIcon: 'fa fa-home', materialIcon: 'home', name: 'pages.home' },
|
|
|
|
|
{ route: '/category', faIcon: 'fa fa-list-alt', materialIcon: 'category', name: 'pages.Category' },
|
|
|
|
|
{ route: '/signup', faIcon: 'fa fa-registered', materialIcon: 'home', name: 'pages.SignUp' },
|
|
|
|
|
{ route: '/signin', faIcon: 'fa fa-anchor', materialIcon: 'home', name: 'pages.SignIn' },
|
2019-01-02 01:58:47 +01:00
|
|
|
/* {route: '/vreg?idlink=aaa', faIcon: 'fa fa-login', materialIcon: 'login', name: 'pages.vreg'},*/
|
2019-01-05 20:11:41 +01:00
|
|
|
],
|
2018-11-05 22:28:59 +01:00
|
|
|
show: true
|
|
|
|
|
},
|
|
|
|
|
Forms: {
|
|
|
|
|
routes: [
|
2019-01-05 20:11:41 +01:00
|
|
|
{ route: '/prec', faIcon: 'fa fa-search', materialIcon: 'search', name: 'pages.Test' },
|
|
|
|
|
],
|
2018-11-05 22:28:59 +01:00
|
|
|
show: false
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-05 20:11:41 +01:00
|
|
|
get MenuCollapse() {
|
2018-11-26 00:53:05 +01:00
|
|
|
return GlobalStore.state.menuCollapse
|
|
|
|
|
// return true
|
2018-11-05 22:28:59 +01:00
|
|
|
}
|
2019-01-05 20:11:41 +01:00
|
|
|
|
|
|
|
|
get Username() {
|
2018-11-26 00:53:05 +01:00
|
|
|
return UserStore.state.username
|
2018-11-05 22:28:59 +01:00
|
|
|
}
|
|
|
|
|
|
2019-01-05 20:11:41 +01:00
|
|
|
get Verificato() {
|
2018-11-26 00:53:05 +01:00
|
|
|
return UserStore.state.verifiedEmail
|
2018-11-05 22:28:59 +01:00
|
|
|
}
|
|
|
|
|
|
2019-01-05 20:11:41 +01:00
|
|
|
get Email() {
|
2018-12-06 20:07:51 +01:00
|
|
|
return UserStore.state.email
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-05 22:28:59 +01:00
|
|
|
logoutHandler() {
|
2018-11-26 00:53:05 +01:00
|
|
|
UserStore.actions.logout()
|
2018-11-05 22:28:59 +01:00
|
|
|
this.$q.notify(this.$t('logout.uscito'))
|
|
|
|
|
}
|
2018-10-12 16:42:54 +02:00
|
|
|
}
|
|
|
|
|
</script>
|
2019-01-05 20:11:41 +01:00
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.background-red {
|
2019-01-02 18:01:36 +01:00
|
|
|
background-color: red;
|
|
|
|
|
padding: 2px;
|
|
|
|
|
}
|
|
|
|
|
|
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%;
|
|
|
|
|
}
|
2019-01-05 20:11:41 +01:00
|
|
|
|
|
|
|
|
footer {
|
|
|
|
|
small {
|
|
|
|
|
color: red;
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-10-12 16:42:54 +02:00
|
|
|
</style>
|