diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /app/assets/javascripts/projects/components/project_delete_button.vue | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'app/assets/javascripts/projects/components/project_delete_button.vue')
-rw-r--r-- | app/assets/javascripts/projects/components/project_delete_button.vue | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/app/assets/javascripts/projects/components/project_delete_button.vue b/app/assets/javascripts/projects/components/project_delete_button.vue new file mode 100644 index 00000000000..4b27c5e3d30 --- /dev/null +++ b/app/assets/javascripts/projects/components/project_delete_button.vue @@ -0,0 +1,52 @@ +<script> +import { GlAlert, GlSprintf } from '@gitlab/ui'; +import { __ } from '~/locale'; +import SharedDeleteButton from './shared/delete_button.vue'; + +export default { + components: { + GlSprintf, + GlAlert, + SharedDeleteButton, + }, + props: { + confirmPhrase: { + type: String, + required: true, + }, + formPath: { + type: String, + required: true, + }, + }, + strings: { + alertTitle: __('You are about to permanently delete this project'), + alertBody: __( + 'Once a project is permanently deleted it %{strongStart}cannot be recovered%{strongEnd}. Permanently deleting this project will %{strongStart}immediately delete%{strongEnd} its respositories and %{strongStart}all related resources%{strongEnd} including issues, merge requests etc.', + ), + modalBody: __( + "This action cannot be undone. You will lose the project's respository and all conent: issues, merge requests, etc.", + ), + }, +}; +</script> + +<template> + <shared-delete-button v-bind="{ confirmPhrase, formPath }"> + <template #modal-body> + <gl-alert + class="gl-mb-5" + variant="danger" + :title="$options.strings.alertTitle" + :dismissible="false" + > + <gl-sprintf :message="$options.strings.alertBody"> + <template #strong="{ content }"> + <strong>{{ content }}</strong> + </template> + </gl-sprintf> + </gl-alert> + <p>{{ $options.strings.modalBody }}</p> + </template> + </shared-delete-button> +</template> |