debian-mirror-gitlab/app/assets/javascripts/issues/show/components/edited.vue

46 lines
913 B
Vue
Raw Normal View History

2017-08-17 22:00:37 +05:30
<script>
2020-04-22 19:07:51 +05:30
/* eslint-disable @gitlab/vue-require-i18n-strings */
2022-01-26 12:08:38 +05:30
import timeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
2017-08-17 22:00:37 +05:30
2018-12-13 13:39:08 +05:30
export default {
components: {
timeAgoTooltip,
},
props: {
updatedAt: {
type: String,
required: false,
default: '',
2017-08-17 22:00:37 +05:30
},
2018-12-13 13:39:08 +05:30
updatedByName: {
type: String,
required: false,
default: '',
2017-08-17 22:00:37 +05:30
},
2018-12-13 13:39:08 +05:30
updatedByPath: {
type: String,
required: false,
default: '',
2017-08-17 22:00:37 +05:30
},
2018-12-13 13:39:08 +05:30
},
computed: {
hasUpdatedBy() {
return this.updatedByName && this.updatedByPath;
},
},
};
2017-08-17 22:00:37 +05:30
</script>
<template>
2019-02-15 15:39:39 +05:30
<small class="edited-text">
2017-08-17 22:00:37 +05:30
Edited
2019-02-15 15:39:39 +05:30
<time-ago-tooltip v-if="updatedAt" :time="updatedAt" tooltip-placement="bottom" />
<span v-if="hasUpdatedBy">
2017-08-17 22:00:37 +05:30
by
2019-02-15 15:39:39 +05:30
<a :href="updatedByPath" class="author-link">
2018-03-17 18:26:18 +05:30
<span>{{ updatedByName }}</span>
2017-08-17 22:00:37 +05:30
</a>
</span>
</small>
</template>