Add time ago fix

environments/review-docs-devel-1399dq/deployments/6607
Ciarán Ainsworth 2020-07-21 14:33:41 +01:00 zatwierdzone przez Agate
rodzic 7e44f89cc0
commit 17869ce1f7
2 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -0,0 +1 @@
Make channel card updated times more humanly readable, add internationalization (#1089)

Wyświetl plik

@ -31,7 +31,7 @@
class="meta ellipsis"
:datetime="object.artist.modification_date"
:title="updatedTitle">
{{ object.artist.modification_date | fromNow }}
%{ updatedAgo }
</time>
<play-button
class="right floated basic icon"
@ -47,6 +47,7 @@ import PlayButton from '@/components/audio/PlayButton'
import TagsList from "@/components/tags/List"
import {momentFormat} from '@/filters'
import moment from "moment"
export default {
props: {
@ -80,6 +81,9 @@ export default {
let d = momentFormat(this.object.artist.modification_date)
let message = this.$pgettext('*/*/*', 'Updated on %{ date }')
return this.$gettextInterpolate(message, {date: d})
},
updatedAgo () {
return moment(this.object.artist.modification_date).fromNow()
}
}
}