You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.3 KiB
55 lines
1.3 KiB
![]()
4 years ago
|
<template>
|
||
![]()
4 years ago
|
<q-item>
|
||
![]()
4 years ago
|
<q-item-section avatar top>
|
||
|
<q-avatar>
|
||
|
<img :src="comment.sender.illustrationUrl">
|
||
|
</q-avatar>
|
||
|
</q-item-section>
|
||
|
|
||
![]()
4 years ago
|
<q-item-section top>
|
||
|
<q-item-label lines="1">
|
||
|
<span class="text-weight-medium">{{ comment.sender.fullName }}</span>
|
||
|
</q-item-label>
|
||
![]()
4 years ago
|
<q-item-label v-html="comment.content" />
|
||
![]()
4 years ago
|
<q-item-label
|
||
|
:title="$filters.abbreviatedDatetime(comment.sendDate)"
|
||
|
caption
|
||
|
>
|
||
|
{{ $filters.relativeDatetime(comment.sendDate) }}
|
||
|
</q-item-label>
|
||
![]()
4 years ago
|
</q-item-section>
|
||
|
|
||
![]()
4 years ago
|
<q-item-section side top>
|
||
![]()
4 years ago
|
<WallActions
|
||
|
:is-owner="isOwner"
|
||
|
:social-post="comment"
|
||
|
@post-deleted="onCommentDeleted($event)"
|
||
|
/>
|
||
![]()
4 years ago
|
</q-item-section>
|
||
|
</q-item>
|
||
|
</template>
|
||
|
|
||
![]()
2 years ago
|
<script setup>
|
||
|
import {useStore} from "vuex"
|
||
|
import {computed} from "vue"
|
||
|
import WallActions from "./Actions"
|
||
|
|
||
|
const props = defineProps({
|
||
|
comment: {
|
||
|
type: Object,
|
||
|
required: true
|
||
![]()
4 years ago
|
}
|
||
![]()
2 years ago
|
})
|
||
|
|
||
|
const emit = defineEmits(['comment-deleted'])
|
||
|
|
||
|
const store = useStore();
|
||
|
const currentUser = store.getters['security/getUser'];
|
||
|
|
||
|
const isOwner = computed(() => currentUser['@id'] === props.comment.sender['@id'])
|
||
|
|
||
|
function onCommentDeleted(event) {
|
||
|
emit('comment-deleted', event);
|
||
![]()
4 years ago
|
}
|
||
|
</script>
|