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 ,
} ,
2021-12-11 22:18:48 +05:30
isFork : {
type : Boolean ,
required : true ,
} ,
issuesCount : {
type : Number ,
required : true ,
} ,
mergeRequestsCount : {
type : Number ,
required : true ,
} ,
forksCount : {
type : Number ,
required : true ,
} ,
starsCount : {
type : Number ,
required : true ,
} ,
2020-10-24 23:57:45 +05:30
} ,
strings : {
alertTitle : _ _ ( 'You are about to permanently delete this project' ) ,
alertBody : _ _ (
2021-12-11 22:18:48 +05:30
'After 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.' ,
) ,
isNotForkMessage : _ _ (
'This project is %{strongStart}NOT%{strongEnd} a fork, and has the following:' ,
2020-10-24 23:57:45 +05:30
) ,
2021-12-11 22:18:48 +05:30
isForkMessage : _ _ ( 'This forked project has the following:' ) ,
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"
>
2021-12-11 22:18:48 +05:30
< p >
< gl-sprintf v-if = "isFork" :message="$options.strings.isForkMessage" / >
< gl-sprintf v -else :message = "$options.strings.isNotForkMessage" >
< template # strong = "{ content }" >
< strong > { { content } } < / strong >
< / template >
< / gl-sprintf >
< / p >
< ul >
< li >
< gl-sprintf : message = "n__('%d issue', '%d issues', issuesCount)" >
< template # issuesCount > { { issuesCount } } < / template >
< / gl-sprintf >
< / li >
< li >
< gl-sprintf
: message = "n__('%d merge requests', '%d merge requests', mergeRequestsCount)"
>
< template # mergeRequestsCount > { { mergeRequestsCount } } < / template >
< / gl-sprintf >
< / li >
< li >
< gl-sprintf : message = "n__('%d fork', '%d forks', forksCount)" >
< template # forksCount > { { forksCount } } < / template >
< / gl-sprintf >
< / li >
< li >
< gl-sprintf : message = "n__('%d star', '%d stars', starsCount)" >
< template # starsCount > { { starsCount } } < / template >
< / gl-sprintf >
< / li >
< / ul >
2020-10-24 23:57:45 +05:30
< gl-sprintf :message = "$options.strings.alertBody" >
< template # strong = "{ content }" >
< strong > { { content } } < / strong >
< / template >
< / gl-sprintf >
< / gl-alert >
< / template >
< / shared-delete-button >
< / template >