2021-07-21 10:19:51 +00:00
|
|
|
<template>
|
2021-10-08 18:52:51 +00:00
|
|
|
<div class="comment uk-flex">
|
|
|
|
<img
|
|
|
|
:src="comment.thumbnail"
|
|
|
|
class="comment-avatar uk-border-circle uk-margin-right"
|
|
|
|
style="width: 48px; height: 48px;"
|
|
|
|
loading="lazy"
|
|
|
|
alt="Avatar"
|
|
|
|
/>
|
2021-07-21 10:19:51 +00:00
|
|
|
|
2021-10-08 18:52:51 +00:00
|
|
|
<div class="comment-content">
|
|
|
|
<div class="comment-header">
|
|
|
|
<div v-if="comment.pinned" class="comment-pinned uk-text-meta">
|
|
|
|
<font-awesome-icon icon="thumbtack"></font-awesome-icon> {{ $t("comment.pinned_by") }}
|
|
|
|
{{ uploader }}
|
|
|
|
</div>
|
2021-07-21 10:19:51 +00:00
|
|
|
|
2021-10-08 18:52:51 +00:00
|
|
|
<div class="comment-author">
|
|
|
|
<router-link class="uk-text-bold uk-text-small" :to="comment.commentorUrl">
|
|
|
|
{{ comment.author }} </router-link
|
|
|
|
> <font-awesome-icon v-if="comment.verified" icon="check"></font-awesome-icon>
|
|
|
|
</div>
|
|
|
|
<div class="comment-meta uk-text-meta uk-margin-small-bottom">
|
|
|
|
{{ comment.commentedTime }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="comment-body" style="white-space: pre-wrap">
|
|
|
|
{{ comment.commentText }}
|
|
|
|
</div>
|
|
|
|
<div class="comment-footer uk-margin-small-top uk-text-meta">
|
|
|
|
<font-awesome-icon icon="thumbs-up" style="margin-right: 4px;"></font-awesome-icon>
|
|
|
|
<span>{{ numberFormat(comment.likeCount) }}</span>
|
|
|
|
|
|
|
|
<font-awesome-icon v-if="comment.hearted" icon="heart"></font-awesome-icon>
|
|
|
|
</div>
|
2021-07-21 10:19:51 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2021-10-08 18:52:51 +00:00
|
|
|
export default {
|
2021-07-21 10:19:51 +00:00
|
|
|
props: {
|
2021-10-08 18:52:51 +00:00
|
|
|
comment: {
|
|
|
|
type: Object,
|
|
|
|
default: () => {
|
|
|
|
return {};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
uploader: { type: String, default: null },
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|