refactor: move MemberEntry

This commit is contained in:
Twig 2025-07-14 21:39:18 +02:00
parent f98e8c6110
commit e7558d9a95
No known key found for this signature in database
2 changed files with 2 additions and 3 deletions

View file

@ -0,0 +1,33 @@
<template>
<div class="member-item" @click="togglePopup" @blur="hidePopup" tabindex="0">
<Avatar :member="props.member" class="member-avatar"/>
<span class="member-display-name">{{ props.member.user.display_name || props.member.user.username }}</span>
<UserPopup v-if="isPopupVisible" :user="props.member.user" id="profile-popup" />
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import type { GuildMemberResponse } from '~/types/interfaces';
const props = defineProps<{
member: GuildMemberResponse
}>();
const isPopupVisible = ref(false);
const togglePopup = () => {
isPopupVisible.value = false;
// isPopupVisible.value = !isPopupVisible.value;
};
const hidePopup = () => {
isPopupVisible.value = false;
};
</script>
<style>
.member-item {
position: relative; /* Set the position to relative for absolute positioning of the popup */
}
</style>