Bugfixing a refaktoring
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user