mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 14:00:06 +02:00
Add time ago fix
This commit is contained in:
parent
21f147c0c4
commit
2e0d3d3e74
2 changed files with 6 additions and 1 deletions
1
changes/changelog.d/1089.bugfix
Normal file
1
changes/changelog.d/1089.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Make channel card updated times more humanly readable, add internationalization (#1089)
|
|
@ -31,7 +31,7 @@
|
||||||
class="meta ellipsis"
|
class="meta ellipsis"
|
||||||
:datetime="object.artist.modification_date"
|
:datetime="object.artist.modification_date"
|
||||||
:title="updatedTitle">
|
:title="updatedTitle">
|
||||||
{{ object.artist.modification_date | fromNow }}
|
%{ updatedAgo }
|
||||||
</time>
|
</time>
|
||||||
<play-button
|
<play-button
|
||||||
class="right floated basic icon"
|
class="right floated basic icon"
|
||||||
|
@ -47,6 +47,7 @@ import PlayButton from '@/components/audio/PlayButton'
|
||||||
import TagsList from "@/components/tags/List"
|
import TagsList from "@/components/tags/List"
|
||||||
|
|
||||||
import {momentFormat} from '@/filters'
|
import {momentFormat} from '@/filters'
|
||||||
|
import moment from "moment"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
@ -75,6 +76,9 @@ export default {
|
||||||
let d = momentFormat(this.object.artist.modification_date)
|
let d = momentFormat(this.object.artist.modification_date)
|
||||||
let message = this.$pgettext('*/*/*', 'Updated on %{ date }')
|
let message = this.$pgettext('*/*/*', 'Updated on %{ date }')
|
||||||
return this.$gettextInterpolate(message, {date: d})
|
return this.$gettextInterpolate(message, {date: d})
|
||||||
|
},
|
||||||
|
updatedAgo () {
|
||||||
|
return moment(this.object.artist.modification_date).fromNow()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue