mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 20:01:54 +02:00
20 lines
455 B
Vue
20 lines
455 B
Vue
<template>
|
|
<time :datetime="date" :title="date | moment">{{ realDate | ago($store.state.ui.momentLocale) }}</time>
|
|
</template>
|
|
<script>
|
|
import {mapState} from 'vuex'
|
|
export default {
|
|
props: ['date'],
|
|
computed: {
|
|
...mapState({
|
|
lastDate: state => state.ui.lastDate
|
|
}),
|
|
realDate () {
|
|
if (this.lastDate) {
|
|
// dummy code to trigger a recompute to update the ago render
|
|
}
|
|
return this.date
|
|
}
|
|
}
|
|
}
|
|
</script>
|