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/tags/components')
-rw-r--r--app/assets/javascripts/tags/components/delete_tag_modal.vue72
-rw-r--r--app/assets/javascripts/tags/components/sort_dropdown.vue1
2 files changed, 21 insertions, 52 deletions
diff --git a/app/assets/javascripts/tags/components/delete_tag_modal.vue b/app/assets/javascripts/tags/components/delete_tag_modal.vue
index e3b666ec968..c4f9db70d2a 100644
--- a/app/assets/javascripts/tags/components/delete_tag_modal.vue
+++ b/app/assets/javascripts/tags/components/delete_tag_modal.vue
@@ -1,9 +1,10 @@
<script>
-import { GlButton, GlFormInput, GlModal, GlSprintf, GlAlert } from '@gitlab/ui';
+import { GlButton, GlFormInput, GlModal, GlSprintf } from '@gitlab/ui';
import { parseBoolean } from '~/lib/utils/common_utils';
import csrf from '~/lib/utils/csrf';
-import { sprintf, s__ } from '~/locale';
+import { sprintf } from '~/locale';
import eventHub from '../event_hub';
+import { I18N_DELETE_TAG_MODAL } from '../constants';
export default {
csrf,
@@ -12,7 +13,6 @@ export default {
GlButton,
GlFormInput,
GlSprintf,
- GlAlert,
},
data() {
return {
@@ -94,57 +94,38 @@ export default {
this.$refs.modal.hide();
},
},
- i18n: {
- modalTitle: s__('TagsPage|Delete tag. Are you ABSOLUTELY SURE?'),
- modalTitleProtectedTag: s__('TagsPage|Delete protected tag. Are you ABSOLUTELY SURE?'),
- modalMessage: s__(
- "TagsPage|You're about to permanently delete the tag %{strongStart}%{tagName}.%{strongEnd}",
- ),
- modalMessageProtectedTag: s__(
- "TagsPage|You're about to permanently delete the protected tag %{strongStart}%{tagName}.%{strongEnd}",
- ),
- undoneWarning: s__(
- 'TagsPage|After you confirm and select %{strongStart}%{buttonText},%{strongEnd} you cannot recover this tag.',
- ),
- cancelButtonText: s__('TagsPage|Cancel, keep tag'),
- confirmationText: s__(
- 'TagsPage|Deleting the %{strongStart}%{tagName}%{strongEnd} tag cannot be undone. Are you sure?',
- ),
- confirmationTextProtectedTag: s__('TagsPage|Please type the following to confirm:'),
- deleteButtonText: s__('TagsPage|Yes, delete tag'),
- deleteButtonTextProtectedTag: s__('TagsPage|Yes, delete protected tag'),
- },
+ i18n: I18N_DELETE_TAG_MODAL,
};
</script>
<template>
<gl-modal ref="modal" size="sm" :modal-id="modalId" :title="title">
- <gl-alert class="gl-mb-5" variant="danger" :dismissible="false">
- <div data-testid="modal-message">
- <gl-sprintf :message="message">
- <template #strong="{ content }">
- <strong> {{ content }} </strong>
- </template>
- </gl-sprintf>
- </div>
- </gl-alert>
+ <div data-testid="modal-message">
+ <gl-sprintf :message="message">
+ <template #strong="{ content }">
+ <strong> {{ content }} </strong>
+ </template>
+ </gl-sprintf>
+ </div>
+ <p class="gl-mt-4">
+ <gl-sprintf :message="confirmationText">
+ <template #strong="{ content }">
+ <strong>
+ {{ content }}
+ </strong>
+ </template>
+ </gl-sprintf>
+ </p>
<form ref="form" :action="path" method="post">
<div v-if="isProtected" class="gl-mt-4">
<p>
- <gl-sprintf :message="undoneWarning">
- <template #strong="{ content }">
- <strong> {{ content }} </strong>
- </template>
- </gl-sprintf>
- </p>
- <p>
<gl-sprintf :message="$options.i18n.confirmationTextProtectedTag">
<template #strong="{ content }">
{{ content }}
</template>
</gl-sprintf>
- <code class="gl-white-space-pre-wrap"> {{ tagName }} </code>
+ <code> {{ tagName }} </code>
<gl-form-input
v-model="enteredTagName"
name="delete_tag_input"
@@ -155,17 +136,6 @@ export default {
/>
</p>
</div>
- <div v-else>
- <p class="gl-mt-4">
- <gl-sprintf :message="confirmationText">
- <template #strong="{ content }">
- <strong>
- {{ content }}
- </strong>
- </template>
- </gl-sprintf>
- </p>
- </div>
<input ref="method" type="hidden" name="_method" value="delete" />
<input :value="$options.csrf.token" type="hidden" name="authenticity_token" />
diff --git a/app/assets/javascripts/tags/components/sort_dropdown.vue b/app/assets/javascripts/tags/components/sort_dropdown.vue
index bb4f3ac0571..87c8742076b 100644
--- a/app/assets/javascripts/tags/components/sort_dropdown.vue
+++ b/app/assets/javascripts/tags/components/sort_dropdown.vue
@@ -60,7 +60,6 @@ export default {
v-model="searchTerm"
:placeholder="$options.i18n.searchPlaceholder"
class="gl-pr-3"
- data-testid="tag-search"
@submit="visitUrlFromOption(selectedKey)"
/>
<gl-collapsible-listbox