gitlab-org--gitlab-foss/app/assets/javascripts/issue_show/components/edited.vue

46 lines
917 B
Vue
Raw Normal View History

<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
2018-10-10 02:23:54 -04:00
import timeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
2018-10-10 02:23:54 -04:00
export default {
components: {
timeAgoTooltip,
},
props: {
updatedAt: {
type: String,
required: false,
default: '',
},
2018-10-10 02:23:54 -04:00
updatedByName: {
type: String,
required: false,
default: '',
},
2018-10-10 02:23:54 -04:00
updatedByPath: {
type: String,
required: false,
default: '',
},
2018-10-10 02:23:54 -04:00
},
computed: {
hasUpdatedBy() {
return this.updatedByName && this.updatedByPath;
},
},
};
</script>
<template>
2018-11-16 15:07:38 -05:00
<small class="edited-text">
Edited
2018-11-16 15:07:38 -05:00
<time-ago-tooltip v-if="updatedAt" :time="updatedAt" tooltip-placement="bottom" />
<span v-if="hasUpdatedBy">
by
2018-11-16 15:07:38 -05:00
<a :href="updatedByPath" class="author-link">
2018-01-05 09:31:01 -05:00
<span>{{ updatedByName }}</span>
</a>
</span>
</small>
</template>