mirror of https://github.com/nextcloud/server.git
Merge pull request #41777 from nextcloud/fix/comments-use-ncdatetime
enh(comments): Move from Moment.js to `NcDateTime`pull/41714/head
commit
2d9f38e0be
@ -1,31 +0,0 @@
|
||||
<!-- TODO: Move to vue components -->
|
||||
|
||||
<template>
|
||||
<span class="live-relative-timestamp" :data-timestamp="timestamp * 1000" :title="title">{{ formatted }}</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from '@nextcloud/moment'
|
||||
|
||||
export default {
|
||||
name: 'Moment',
|
||||
props: {
|
||||
timestamp: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
format: {
|
||||
type: String,
|
||||
default: 'LLL',
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return moment.unix(this.timestamp).format(this.format)
|
||||
},
|
||||
formatted() {
|
||||
return moment.unix(this.timestamp).fromNow()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue