diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
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> |