debian-mirror-gitlab/app/assets/javascripts/projects/components/project_delete_button.vue

53 lines
1.5 KiB
Vue
Raw Normal View History

2020-10-24 23:57:45 +05:30
<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: __(
2020-11-24 15:15:51 +05:30
'Once a project is permanently deleted it %{strongStart}cannot be recovered%{strongEnd}. Permanently deleting this project will %{strongStart}immediately delete%{strongEnd} its repositories and %{strongStart}all related resources%{strongEnd} including issues, merge requests etc.',
2020-10-24 23:57:45 +05:30
),
modalBody: __(
2021-01-29 00:20:46 +05:30
"This action cannot be undone. You will lose this project's repository and all content: issues, merge requests, etc.",
2020-10-24 23:57:45 +05:30
),
},
};
</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>