Bugfixing a refaktoring

This commit is contained in:
Michal Kváček
2023-10-13 23:25:06 +02:00
parent bf8df8bb34
commit 5b47c56c6f
10 changed files with 151 additions and 116 deletions
@@ -0,0 +1,43 @@
<script setup>
import AvatarFromPhoto from "components/avatars/AvatarFromPhoto.vue";
const props = defineProps({
loggedUser: {
type: Object,
required: true
}
});
const emits = defineEmits(["logout"]);
const logout = () => emits("logout");
</script>
<template>
<q-btn flat>
<AvatarFromPhoto v-if="loggedUser.avatarImageUrl" :size="32" :src="loggedUser.avatarImageUrl"/>
<q-icon name="person" v-else/>
<q-menu auto-close>
<q-list style="min-width: 200px">
<q-item clickable :to="{name: 'profile'}">
<q-item-section avatar>
<q-icon name="person"/>
</q-item-section>
<q-item-section>Osobní nastavení</q-item-section>
</q-item>
<q-item clickable @click="logout" class="q-mt-lg">
<q-item-section avatar>
<q-icon name="logout"/>
</q-item-section>
<q-item-section>
Odhlásit
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</template>