2017-06-13 13:01:59 -04:00
|
|
|
<script>
|
2020-03-18 11:09:45 -04:00
|
|
|
/* eslint-disable @gitlab/vue-require-i18n-strings */
|
2018-03-16 16:16:21 -04:00
|
|
|
import timeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
|
2017-06-13 13:01:59 -04:00
|
|
|
|
2018-03-16 16:16:21 -04:00
|
|
|
export default {
|
|
|
|
name: 'EditedNoteText',
|
|
|
|
components: {
|
|
|
|
timeAgoTooltip,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
actionText: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
2018-01-04 19:18:35 -05:00
|
|
|
},
|
2018-06-21 08:22:40 -04:00
|
|
|
actionDetailText: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '',
|
|
|
|
},
|
2018-03-16 16:16:21 -04:00
|
|
|
editedAt: {
|
|
|
|
type: String,
|
2018-06-21 08:22:40 -04:00
|
|
|
required: false,
|
|
|
|
default: null,
|
2017-06-13 13:01:59 -04:00
|
|
|
},
|
2018-03-16 16:16:21 -04:00
|
|
|
editedBy: {
|
|
|
|
type: Object,
|
|
|
|
required: false,
|
2018-06-21 08:22:40 -04:00
|
|
|
default: null,
|
2018-03-16 16:16:21 -04:00
|
|
|
},
|
|
|
|
className: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: 'edited-text',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2017-06-13 13:01:59 -04:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div :class="className">
|
2018-01-04 19:18:35 -05:00
|
|
|
{{ actionText }}
|
2017-08-18 11:51:43 -04:00
|
|
|
<template v-if="editedBy">
|
2018-12-07 22:12:23 -05:00
|
|
|
by
|
|
|
|
<a :href="editedBy.path" :data-user-id="editedBy.id" class="js-user-link author-link">
|
|
|
|
{{ editedBy.name }}
|
|
|
|
</a>
|
2017-08-18 11:51:43 -04:00
|
|
|
</template>
|
2018-06-21 08:22:40 -04:00
|
|
|
{{ actionDetailText }}
|
2018-11-16 15:07:38 -05:00
|
|
|
<time-ago-tooltip :time="editedAt" tooltip-placement="bottom" />
|
2017-06-13 13:01:59 -04:00
|
|
|
</div>
|
|
|
|
</template>
|