Sharkey/packages/client/src/components/renote.details.vue

61 lines
1 KiB
Vue
Raw Normal View History

<template>
2021-11-19 11:36:12 +01:00
<MkTooltip ref="tooltip" :source="source" :max-width="250" @closed="$emit('closed')">
2021-11-14 05:13:22 +01:00
<div class="beaffaef">
2021-11-19 11:36:12 +01:00
<div v-for="u in users" :key="u.id" class="user">
2021-11-14 05:13:22 +01: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>
</div>
</MkTooltip>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import MkTooltip from './ui/tooltip.vue';
export default defineComponent({
components: {
MkTooltip,
},
props: {
users: {
type: Array,
required: true,
},
count: {
type: Number,
required: true,
},
source: {
required: true,
}
},
emits: ['closed'],
})
</script>
<style lang="scss" scoped>
2021-11-14 05:13:22 +01:00
.beaffaef {
font-size: 0.9em;
2021-11-14 05:13:22 +01: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;
}
}
}
</style>