enhance: show renoters (#7954)
* refactor: deduplicate renote button into component For now the renoters tooltip just uses the reaction viewer component with a fixed emoji symbol instead. * chore: remove unnecessary CSS * fix: forgot to rename variable * enhance: use own tooltip instead of reaction viewer * clean up style * fix additional renoters number * rename file to better represent content
This commit is contained in:
46
packages/client/src/components/renote.details.vue
Normal file
46
packages/client/src/components/renote.details.vue
Normal file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<MkTooltip :source="source" ref="tooltip" @closed="$emit('closed')" :max-width="340">
|
||||
<div class="renoteTooltip">
|
||||
<b v-for="u in users" :key="u.id">
|
||||
<MkAvatar :user="u" style="width: 24px; height: 24px;"/><br/>
|
||||
<MkUserName :user="u" :nowrap="false" style="line-height: 24px;"/>
|
||||
</b>
|
||||
<span v-if="users.length < count" slot="omitted">+{{ count - users.length }}</span>
|
||||
</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>
|
||||
.renoteTooltip {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: 0.9em;
|
||||
gap: 12px;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user