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
|
<script>
import { GlButton, GlTooltipDirective } from '@gitlab/ui';
import { __ } from '~/locale';
import ReplyButton from '~/notes/components/note_actions/reply_button.vue';
export default {
name: 'WorkItemNoteActions',
i18n: {
editButtonText: __('Edit comment'),
},
components: {
GlButton,
ReplyButton,
},
directives: {
GlTooltip: GlTooltipDirective,
},
props: {
showReply: {
type: Boolean,
required: true,
},
showEdit: {
type: Boolean,
required: true,
},
},
};
</script>
<template>
<div class="note-actions">
<reply-button v-if="showReply" ref="replyButton" @startReplying="$emit('startReplying')" />
<gl-button
v-if="showEdit"
v-gl-tooltip
data-testid="edit-work-item-note"
data-track-action="click_button"
data-track-label="edit_button"
category="tertiary"
icon="pencil"
:title="$options.i18n.editButtonText"
:aria-label="$options.i18n.editButtonText"
@click="$emit('startEditing')"
/>
</div>
</template>
|