summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
downloadgitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue')
-rw-r--r--app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue15
1 files changed, 3 insertions, 12 deletions
diff --git a/app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue b/app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue
index 55cd13a6930..ab2553265a2 100644
--- a/app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue
+++ b/app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue
@@ -2,7 +2,6 @@
import { GlButton } from '@gitlab/ui';
import { cloneDeep } from 'lodash';
import { s__, sprintf } from '~/locale';
-import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import SnippetBlobEdit from './snippet_blob_edit.vue';
import { SNIPPET_MAX_BLOBS } from '../constants';
import { createBlob, decorateBlob, diffAll } from '../utils/blob';
@@ -12,7 +11,6 @@ export default {
SnippetBlobEdit,
GlButton,
},
- mixins: [glFeatureFlagsMixin()],
props: {
initBlobs: {
type: Array,
@@ -52,12 +50,6 @@ export default {
canAdd() {
return this.count < SNIPPET_MAX_BLOBS;
},
- hasMultiFilesEnabled() {
- return this.glFeatures.snippetMultipleFiles;
- },
- filesLabel() {
- return this.hasMultiFilesEnabled ? s__('Snippets|Files') : s__('Snippets|File');
- },
firstInputId() {
const blobId = this.blobIds[0];
@@ -131,24 +123,23 @@ export default {
};
</script>
<template>
- <div class="form-group file-editor">
- <label :for="firstInputId">{{ filesLabel }}</label>
+ <div class="form-group">
+ <label :for="firstInputId">{{ s__('Snippets|Files') }}</label>
<snippet-blob-edit
v-for="(blobId, index) in blobIds"
:key="blobId"
:class="{ 'gl-mt-3': index > 0 }"
:blob="blobs[blobId]"
:can-delete="canDelete"
- :show-delete="hasMultiFilesEnabled"
@blob-updated="updateBlob(blobId, $event)"
@delete="deleteBlob(blobId)"
/>
<gl-button
- v-if="hasMultiFilesEnabled"
:disabled="!canAdd"
data-testid="add_button"
class="gl-my-3"
variant="dashed"
+ data-qa-selector="add_file_button"
@click="addBlob"
>{{ addLabel }}</gl-button
>