1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
<script>
import { GlAvatarLink, GlAvatar } from '@gitlab/ui';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
import NoteBody from '~/work_items/components/notes/work_item_note_body.vue';
import NoteHeader from '~/notes/components/note_header.vue';
export default {
components: {
NoteHeader,
NoteBody,
TimelineEntryItem,
GlAvatarLink,
GlAvatar,
},
props: {
note: {
type: Object,
required: true,
},
},
computed: {
author() {
return this.note.author;
},
noteAnchorId() {
return `note_${this.note.id}`;
},
},
};
</script>
<template>
<timeline-entry-item
:id="noteAnchorId"
:class="{ 'internal-note': note.internal }"
:data-note-id="note.id"
class="note note-wrapper note-comment"
>
<div class="timeline-avatar gl-float-left">
<gl-avatar-link :href="author.webUrl">
<gl-avatar
:src="author.avatarUrl"
:entity-name="author.username"
:alt="author.name"
:size="32"
/>
</gl-avatar-link>
</div>
<div class="timeline-content">
<div class="note-header">
<note-header :author="author" :created-at="note.createdAt" :note-id="note.id" />
</div>
<div class="timeline-discussion-body">
<note-body :note="note" />
</div>
</div>
</timeline-entry-item>
</template>
|