Skip to content
Snippets Groups Projects
Commit 2e0d3d3e authored by Ciarán Ainsworth's avatar Ciarán Ainsworth
Browse files

Add time ago fix

parent 21f147c0
No related branches found
No related tags found
No related merge requests found
Make channel card updated times more humanly readable, add internationalization (#1089)
\ No newline at end of file
......@@ -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: {
......@@ -75,6 +76,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()
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment