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
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-06-19 03:09:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-19 03:09:54 +0300
commit7e1a2eecb0f25bcc69cafa2fd8615885794fd406 (patch)
treee6ce91e5449b8288959bb0ddb5acb29878e44d81 /app
parent047eb7596938953e0e927dfae9096a9326c98a53 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue10
-rw-r--r--app/assets/javascripts/snippets/constants.js4
2 files changed, 12 insertions, 2 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 260ee496df0..59f7c8d8d97 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,7 @@
import { GlButton, GlFormGroup } from '@gitlab/ui';
import { cloneDeep } from 'lodash';
import { s__, sprintf } from '~/locale';
-import { SNIPPET_MAX_BLOBS } from '../constants';
+import { SNIPPET_MAX_BLOBS, SNIPPET_LIMITATIONS } from '../constants';
import { createBlob, decorateBlob, diffAll } from '../utils/blob';
import SnippetBlobEdit from './snippet_blob_edit.vue';
@@ -50,6 +50,11 @@ export default {
total: SNIPPET_MAX_BLOBS,
});
},
+ limitationText() {
+ return sprintf(SNIPPET_LIMITATIONS, {
+ total: SNIPPET_MAX_BLOBS,
+ });
+ },
canDelete() {
return this.count > 1;
},
@@ -159,5 +164,8 @@ export default {
@click="addBlob"
>{{ addLabel }}</gl-button
>
+ <p v-if="!canAdd" data-testid="limitations_text" class="gl-text-secondary">
+ {{ limitationText }}
+ </p>
</div>
</template>
diff --git a/app/assets/javascripts/snippets/constants.js b/app/assets/javascripts/snippets/constants.js
index 84a940ed1f8..2d2eede9137 100644
--- a/app/assets/javascripts/snippets/constants.js
+++ b/app/assets/javascripts/snippets/constants.js
@@ -1,4 +1,4 @@
-import { __ } from '~/locale';
+import { __, s__ } from '~/locale';
import {
VISIBILITY_LEVEL_PRIVATE_STRING,
VISIBILITY_LEVEL_INTERNAL_STRING,
@@ -41,3 +41,5 @@ export const SNIPPET_LEVELS_RESTRICTED = __(
export const SNIPPET_LEVELS_DISABLED = __(
'Visibility settings have been disabled by the administrator.',
);
+
+export const SNIPPET_LIMITATIONS = s__('Snippets|Snippets are limited to %{total} files.');