1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-02-07 06:09:17 +00:00
bramw_baserow/web-frontend/modules/builder/components/domain/LastPublishedDomainDate.vue

28 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>