gitlab-org--gitlab-foss/app/assets/javascripts/notes/components/note_edited_text.vue

52 lines
1 KiB
Vue
Raw Normal View History

<script>
/* 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';
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,
},
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',
},
},
};
</script>
<template>
<div :class="className">
2018-01-04 19:18:35 -05:00
{{ actionText }}
<template v-if="editedBy">
by
<a :href="editedBy.path" :data-user-id="editedBy.id" class="js-user-link author-link">
{{ editedBy.name }}
</a>
</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" />
</div>
</template>