blob: 570954c7200c88a2ea454989554217dc385db147 (
plain)
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
|
<script>
import { mapGetters } from 'vuex';
import imageDiff from '~/diffs/mixins/image_diff';
import DraftNote from './draft_note.vue';
export default {
components: {
DraftNote,
},
mixins: [imageDiff],
props: {
fileHash: {
type: String,
required: true,
},
},
computed: {
...mapGetters('batchComments', ['draftsForFile']),
drafts() {
return this.draftsForFile(this.fileHash);
},
},
};
</script>
<template>
<div>
<div
v-for="(draft, index) in drafts"
:key="draft.id"
class="discussion-notes diff-discussions position-relative"
>
<div class="notes">
<span class="d-block btn-transparent badge badge-pill is-draft js-diff-notes-index">
{{ toggleText(draft, index) }}
</span>
<draft-note :draft="draft" />
</div>
</div>
</div>
</template>
|