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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<template lang='pug'>
q-btn.q-ml-md(flat, round, dense, color='grey')
q-icon(
v-if='!userStore.authenticated || !userStore.hasAvatar'
name='las la-user-circle'
)
q-avatar(
v-else
size='32px'
)
img(:src='`/_user/` + userStore.id + `/avatar`')
q-menu.translucent-menu(auto-close)
q-card(flat, style='width: 300px;', :dark='false')
q-card-section(align='center')
.text-subtitle1.text-grey-7 {{userStore.name}}
.text-caption.text-grey-8 {{userStore.email}}
q-separator(:dark='false')
q-card-actions(align='center')
q-btn(
flat
:label='t(`common.header.profile`)'
icon='las la-user-alt'
color='primary'
to='/_profile'
no-caps
)
q-btn(flat
:label='t(`common.header.logout`)'
icon='las la-sign-out-alt'
color='red'
@click='userStore.logout()'
no-caps
)
q-tooltip {{ t('common.header.account') }}
</template>
<script setup>
import { useI18n } from 'vue-i18n'
import { useUserStore } from 'src/stores/user'
// STORES
const userStore = useUserStore()
// I18N
const { t } = useI18n()
</script>
<style lang="scss">
</style>