From 1fa79760ad2d4bd67f5c5a27f372a7533b9b7c69 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 10 Mar 2020 12:08:16 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../registry/explorer/pages/details.vue | 2 +- .../components/snippet_visibility_edit.vue | 95 ++++++++++++++++++++++ app/assets/javascripts/snippets/constants.js | 18 ++++ 3 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 app/assets/javascripts/snippets/components/snippet_visibility_edit.vue (limited to 'app/assets/javascripts') diff --git a/app/assets/javascripts/registry/explorer/pages/details.vue b/app/assets/javascripts/registry/explorer/pages/details.vue index 0f4ed1550ce..88e437b16d9 100644 --- a/app/assets/javascripts/registry/explorer/pages/details.vue +++ b/app/assets/javascripts/registry/explorer/pages/details.vue @@ -102,7 +102,7 @@ export default { return this.tagsPagination.page; }, set(page) { - this.requestTagsList({ pagination: { page }, id: this.$route.params.id }); + this.requestTagsList({ pagination: { page }, params: this.$route.params.id }); }, }, }, diff --git a/app/assets/javascripts/snippets/components/snippet_visibility_edit.vue b/app/assets/javascripts/snippets/components/snippet_visibility_edit.vue new file mode 100644 index 00000000000..93cd2b58c11 --- /dev/null +++ b/app/assets/javascripts/snippets/components/snippet_visibility_edit.vue @@ -0,0 +1,95 @@ + + diff --git a/app/assets/javascripts/snippets/constants.js b/app/assets/javascripts/snippets/constants.js index 87e3fe360a3..ed2f1156292 100644 --- a/app/assets/javascripts/snippets/constants.js +++ b/app/assets/javascripts/snippets/constants.js @@ -1,3 +1,21 @@ +import { __ } from '~/locale'; + export const SNIPPET_VISIBILITY_PRIVATE = 'private'; export const SNIPPET_VISIBILITY_INTERNAL = 'internal'; export const SNIPPET_VISIBILITY_PUBLIC = 'public'; + +export const SNIPPET_VISIBILITY = { + private: { + label: __('Private'), + description: __('The snippet is visible only to me.'), + description_project: __('The snippet is visible only to project members.'), + }, + internal: { + label: __('Internal'), + description: __('The snippet is visible to any logged in user.'), + }, + public: { + label: __('Public'), + description: __('The snippet can be accessed without any authentication.'), + }, +}; -- cgit v1.2.3