blob: 9a73017540bdb4ad0d1ce6894352e9f479e89778 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<template>
<div v-if="item.actor_info" class="post-avatar">
<Avatar v-if="item.local"
class="messages__avatar__icon"
:show-user-status="false"
menu-position="left"
:user="userTest"
:display-name="item.actor_info.account"
:disable-tooltip="true" />
<Avatar v-else
:url="avatarUrl"
:disable-tooltip="true" />
</div>
</template>
<script>
import Avatar from '@nextcloud/vue/dist/Components/Avatar'
export default {
name: 'TimelineAvatar',
components: {
Avatar
},
props: {
item: {
type: Object,
default: () => {}
}
},
computed: {
userTest() {
return this.item.actor_info.preferredUsername
},
avatarUrl() {
return OC.generateUrl('/apps/social/api/v1/global/actor/avatar?id=' + this.item.attributedTo)
}
}
}
</script>
<style scoped>
.post-avatar {
position: relative;
padding: 18px 10px 10px 10px;
height: 52px;
width: 52px;
}
</style>
|