mirror of
https://gitlab.com/bramw/baserow.git
synced 2024-11-22 07:42:36 +00:00
29 lines
563 B
Vue
29 lines
563 B
Vue
<template>
|
|
<span class="last-published-domain-date">
|
|
{{ $t('lastPublishedDomainDate.lastPublished') }}
|
|
{{ getHumanDate(domain.last_published) }}
|
|
</span>
|
|
</template>
|
|
|
|
<script>
|
|
import moment from '@baserow/modules/core/moment'
|
|
|
|
export default {
|
|
name: 'LastPublishedDomainDate',
|
|
props: {
|
|
domain: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
},
|
|
methods: {
|
|
getHumanDate(date) {
|
|
if (!date) {
|
|
return this.$t('lastPublishedDomainDate.neverPublished')
|
|
}
|
|
return moment.utc(date).fromNow()
|
|
},
|
|
},
|
|
}
|
|
</script>
|