diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-22 15:07:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-22 15:07:28 +0300 |
commit | 4220cf46a314ac1c4d88be13608752bc07bb28fb (patch) | |
tree | 169db13fd06c7622bbcf59b707d57d516f44e299 /app/assets/javascripts/admin | |
parent | 4c7e34071eceb05a9ce271354c21de7487e4ff84 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/admin')
-rw-r--r-- | app/assets/javascripts/admin/topics/components/remove_avatar.vue | 13 | ||||
-rw-r--r-- | app/assets/javascripts/admin/topics/index.js | 3 |
2 files changed, 10 insertions, 6 deletions
diff --git a/app/assets/javascripts/admin/topics/components/remove_avatar.vue b/app/assets/javascripts/admin/topics/components/remove_avatar.vue index 5e94d6185e0..a54c30a8336 100644 --- a/app/assets/javascripts/admin/topics/components/remove_avatar.vue +++ b/app/assets/javascripts/admin/topics/components/remove_avatar.vue @@ -1,6 +1,6 @@ <script> import { uniqueId } from 'lodash'; -import { GlButton, GlModal, GlModalDirective } from '@gitlab/ui'; +import { GlButton, GlModal, GlModalDirective, GlSprintf } from '@gitlab/ui'; import { __ } from '~/locale'; import csrf from '~/lib/utils/csrf'; @@ -8,11 +8,12 @@ export default { components: { GlButton, GlModal, + GlSprintf, }, directives: { GlModal: GlModalDirective, }, - inject: ['path'], + inject: ['path', 'name'], data() { return { modalId: uniqueId('remove-topic-avatar-'), @@ -25,8 +26,8 @@ export default { }, i18n: { remove: __('Remove avatar'), - title: __('Confirm remove avatar'), - body: __('Avatar will be removed. Are you sure?'), + title: __('Remove topic avatar'), + body: __('Topic avatar for %{name} will be removed. This cannot be undone.'), }, modal: { actionPrimary: { @@ -57,7 +58,9 @@ export default { :modal-id="modalId" size="sm" @primary="deleteApplication" - >{{ $options.i18n.body }} + ><gl-sprintf :message="$options.i18n.body" + ><template #name>{{ name }}</template></gl-sprintf + > <form ref="deleteForm" method="post" :action="path"> <input type="hidden" name="_method" value="delete" /> <input type="hidden" name="authenticity_token" :value="$options.csrf.token" /> diff --git a/app/assets/javascripts/admin/topics/index.js b/app/assets/javascripts/admin/topics/index.js index 8fbcadf3369..09e9b20f220 100644 --- a/app/assets/javascripts/admin/topics/index.js +++ b/app/assets/javascripts/admin/topics/index.js @@ -8,12 +8,13 @@ export default () => { return false; } - const { path } = el.dataset; + const { path, name } = el.dataset; return new Vue({ el, provide: { path, + name, }, render(h) { return h(RemoveAvatar); |