2021-11-12 08:15:14 -06:00
|
|
|
<template>
|
2022-12-22 01:59:11 -06:00
|
|
|
<MkTooltip ref="tooltip" :showing="showing" :target-element="targetElement" :max-width="250" @closed="emit('closed')">
|
2021-11-13 22:13:22 -06:00
|
|
|
<div class="beaffaef">
|
2021-11-19 04:36:12 -06:00
|
|
|
<div v-for="u in users" :key="u.id" class="user">
|
2021-11-13 22:13:22 -06:00
|
|
|
<MkAvatar class="avatar" :user="u"/>
|
|
|
|
<MkUserName class="name" :user="u" :nowrap="true"/>
|
|
|
|
</div>
|
|
|
|
<div v-if="users.length < count" class="omitted">+{{ count - users.length }}</div>
|
2021-11-12 08:15:14 -06:00
|
|
|
</div>
|
|
|
|
</MkTooltip>
|
|
|
|
</template>
|
|
|
|
|
2022-01-13 19:35:32 -06:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { } from 'vue';
|
2022-09-06 04:21:49 -05:00
|
|
|
import MkTooltip from './MkTooltip.vue';
|
2021-11-12 08:15:14 -06:00
|
|
|
|
2022-12-22 01:59:11 -06:00
|
|
|
defineProps<{
|
|
|
|
showing: boolean;
|
2022-01-13 19:35:32 -06:00
|
|
|
users: any[]; // TODO
|
|
|
|
count: number;
|
2022-01-31 06:07:33 -06:00
|
|
|
targetElement: HTMLElement;
|
2022-01-13 19:35:32 -06:00
|
|
|
}>();
|
|
|
|
|
|
|
|
const emit = defineEmits<{
|
2022-01-31 06:07:33 -06:00
|
|
|
(ev: 'closed'): void;
|
2022-01-13 19:35:32 -06:00
|
|
|
}>();
|
2021-11-12 08:15:14 -06:00
|
|
|
</script>
|
|
|
|
|
2022-12-27 03:29:39 -06:00
|
|
|
<style lang="scss" scoped>
|
2021-11-13 22:13:22 -06:00
|
|
|
.beaffaef {
|
2021-11-12 08:15:14 -06:00
|
|
|
font-size: 0.9em;
|
2021-11-13 22:13:22 -06:00
|
|
|
text-align: left;
|
|
|
|
|
|
|
|
> .user {
|
|
|
|
line-height: 24px;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-bottom: 3px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .avatar {
|
|
|
|
width: 24px;
|
|
|
|
height: 24px;
|
|
|
|
margin-right: 3px;
|
|
|
|
}
|
|
|
|
}
|
2021-11-12 08:15:14 -06:00
|
|
|
}
|
|
|
|
</style>
|