frontend/components/Guild/MemberEntry.vue
Temmie 26e215ed23
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
ci/woodpecker/pr/build-and-publish Pipeline was successful
feat:? add IRC colours to every user and member entry
2025-08-05 04:17:37 +02:00

44 lines
1 KiB
Vue

<template>
<div class="member-item" @click.prevent="showModalPopup" tabindex="0">
<Avatar :profile="props.member" class="member-avatar"/>
<span class="member-display-name" :style="`color: ${generateIrcColor(props.member.user.uuid)}`">
{{ getDisplayName(props.member) }}
</span>
</div>
<ModalProfilePopup v-if="modalPopupVisible" :profile="props.member"
:onFinish="hideModalPopup" :keepalive="false"/>
</template>
<script lang="ts" setup>
import { ModalProfilePopup } from '#components';
import type { GuildMemberResponse } from '~/types/interfaces';
const { getDisplayName } = useProfile()
const props = defineProps<{
member: GuildMemberResponse
}>();
const modalPopupVisible = ref<boolean>(false);
function showModalPopup() {
modalPopupVisible.value = true
}
function hideModalPopup() {
modalPopupVisible.value = false
}
</script>
<style>
.member-item {
position: relative;
}
.member-avatar {
min-height: 2.3em;
max-height: 2.3em;
min-width: 2.3em;
max-width: 2.3em;
}
</style>