Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(card): tooltip for comment timestamp #5253

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading