diff options
Diffstat (limited to 'app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue')
-rw-r--r-- | app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue b/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue index 387438fb726..cd44c998074 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue @@ -1,12 +1,14 @@ <script> import { GlIcon, GlTooltipDirective } from '@gitlab/ui'; -import { formatDate, getTimeago, durationTimeFormatted } from '~/lib/utils/datetime_utility'; +import { durationTimeFormatted } from '~/lib/utils/datetime_utility'; +import timeagoMixin from '~/vue_shared/mixins/timeago'; export default { directives: { GlTooltip: GlTooltipDirective, }, components: { GlIcon }, + mixins: [timeagoMixin], props: { pipeline: { type: Object, @@ -35,12 +37,6 @@ export default { showSkipped() { return !this.duration && !this.finishedTime && this.skipped; }, - timeFormatted() { - return getTimeago().format(this.finishedTime); - }, - tooltipTitle() { - return formatDate(this.finishedTime); - }, }, }; </script> @@ -73,12 +69,12 @@ export default { <time v-gl-tooltip - :title="tooltipTitle" + :title="tooltipTitle(finishedTime)" :datetime="finishedTime" data-placement="top" data-container="body" > - {{ timeFormatted }} + {{ timeFormatted(finishedTime) }} </time> </p> </div> |