Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/artifacts/components/artifact_delete_modal.vue')
-rw-r--r--app/assets/javascripts/artifacts/components/artifact_delete_modal.vue54
1 files changed, 54 insertions, 0 deletions
diff --git a/app/assets/javascripts/artifacts/components/artifact_delete_modal.vue b/app/assets/javascripts/artifacts/components/artifact_delete_modal.vue
new file mode 100644
index 00000000000..14edd73824e
--- /dev/null
+++ b/app/assets/javascripts/artifacts/components/artifact_delete_modal.vue
@@ -0,0 +1,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>