diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-17 15:10:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-17 15:10:12 +0300 |
commit | 4203215d542505bba491a01d637479934c8005d6 (patch) | |
tree | 000a956ac60247021ff8c36a1a17a1ea6ed1ff38 /app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue | |
parent | 325318e2ddfcaedf0527053dd3c9bd62db547089 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue b/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue index b1a4f3dccaf..4447a87777a 100644 --- a/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue +++ b/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue @@ -1,5 +1,6 @@ <script> import { GlTooltipDirective } from '@gitlab/ui'; + import timeagoMixin from '../mixins/timeago'; import '../../lib/utils/datetime_utility'; @@ -28,6 +29,11 @@ export default { default: '', }, }, + computed: { + timeAgo() { + return this.timeFormatted(this.time); + }, + }, }; </script> <template> @@ -35,7 +41,7 @@ export default { v-gl-tooltip.viewport="{ placement: tooltipPlacement }" :class="cssClass" :title="tooltipTitle(time)" - v-text="timeFormatted(time)" + :datetime="time" + ><slot :timeAgo="timeAgo">{{ timeAgo }}</slot></time > - </time> </template> |