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

46 lines
917 B
Vue
Raw Normal View History

2017-08-17 22:00:37 +05:30
<script>
2019-10-12 21:52:04 +05:30
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
2018-12-13 13:39:08 +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>