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
|
<script>
import { GlModal } from '@gitlab/ui';
import {
I18N_MODAL_TITLE,
I18N_MODAL_BODY,
I18N_MODAL_PRIMARY,
I18N_MODAL_CANCEL,
} from '../constants';
export default {
components: {
GlModal,
},
props: {
artifactName: {
type: String,
required: true,
},
deleteInProgress: {
type: Boolean,
required: true,
},
},
computed: {
actionPrimary() {
return {
text: I18N_MODAL_PRIMARY,
attributes: { variant: 'danger', loading: this.deleteInProgress },
};
},
},
actionCancel: { text: I18N_MODAL_CANCEL },
i18n: {
title: I18N_MODAL_TITLE,
body: I18N_MODAL_BODY,
},
};
</script>
<template>
<gl-modal
ref="modal"
modal-id="artifact-delete-modal"
size="sm"
:title="$options.i18n.title(artifactName)"
:action-primary="actionPrimary"
:action-cancel="$options.actionCancel"
v-bind="$attrs"
v-on="$listeners"
>
{{ $options.i18n.body }}
</gl-modal>
</template>
|