Skip to content

Commit

Permalink
feat(card): tooltip for comment timestamp
Browse files Browse the repository at this point in the history
Signed-off-by: Fitrah Munir <fitrahmunir@outlook.com>
  • Loading branch information
fitrahmunir committed Oct 31, 2023
1 parent 7a7d40f commit 2f16239
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/card/CommentItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@
<NcActionButton icon="icon-close" @click="hideUpdateForm" />
</NcActions>
<div class="spacer" />
<div class="timestamp">
<div class="timestamp"
:aria-label="formattedTimestamp"
:title="formattedTimestamp">
{{ relativeDate(comment.creationDateTime) }}
</div>
</div>
Expand All @@ -70,6 +72,7 @@ import { getCurrentUser } from '@nextcloud/auth'
import md5 from 'blueimp-md5'
import relativeDate from '../../mixins/relativeDate.js'
import ReplyIcon from 'vue-material-design-icons/Reply.vue'
import moment from 'moment'
const AtMention = {
name: 'AtMention',
Expand Down Expand Up @@ -158,6 +161,9 @@ export default {
return (div.textContent || div.innerText || '')
}
},
formattedTimestamp() {
return t('deck', 'Created:') + ' ' + moment(this.comment.creationDateTime).format('LLLL')
},
},
methods: {
Expand Down

0 comments on commit 2f16239

Please sign in to comment.