Show relative timestamp using mixin

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-03-06 16:11:00 +01:00
parent fb06cac246
commit ecbbc29384
4 changed files with 53 additions and 11 deletions

View File

@@ -27,6 +27,10 @@
<Actions v-if="edit">
<ActionButton icon="icon-close" @click="hideUpdateForm" />
</Actions>
<div class="spacer" />
<div class="timestamp">
{{ relativeDate(comment.creationDateTime) }}
</div>
</div>
<CommentItem v-if="comment.replyTo" :reply="true" :comment="comment.replyTo" />
<RichText v-show="!edit"
@@ -46,6 +50,7 @@ import RichText from '@juliushaertl/vue-richtext'
import CommentForm from './CommentForm'
import { getCurrentUser } from '@nextcloud/auth'
import md5 from 'blueimp-md5'
import relativeDate from '../../mixins/relativeDate'
const AtMention = {
name: 'AtMention',
@@ -62,6 +67,7 @@ const AtMention = {
export default {
name: 'CommentItem',
mixins: [ relativeDate ],
components: {
Avatar,
UserBubble,