debian-mirror-gitlab/app/assets/javascripts/snippets/constants.js

25 lines
772 B
JavaScript
Raw Normal View History

2020-04-08 14:13:33 +05:30
import { __ } from '~/locale';
2020-03-13 15:44:24 +05:30
export const SNIPPET_VISIBILITY_PRIVATE = 'private';
export const SNIPPET_VISIBILITY_INTERNAL = 'internal';
export const SNIPPET_VISIBILITY_PUBLIC = 'public';
2020-04-08 14:13:33 +05:30
export const SNIPPET_VISIBILITY = {
2020-04-22 19:07:51 +05:30
[SNIPPET_VISIBILITY_PRIVATE]: {
2020-04-08 14:13:33 +05:30
label: __('Private'),
2020-04-22 19:07:51 +05:30
icon: 'lock',
2020-04-08 14:13:33 +05:30
description: __('The snippet is visible only to me.'),
description_project: __('The snippet is visible only to project members.'),
},
2020-04-22 19:07:51 +05:30
[SNIPPET_VISIBILITY_INTERNAL]: {
2020-04-08 14:13:33 +05:30
label: __('Internal'),
2020-04-22 19:07:51 +05:30
icon: 'shield',
2020-04-08 14:13:33 +05:30
description: __('The snippet is visible to any logged in user.'),
},
2020-04-22 19:07:51 +05:30
[SNIPPET_VISIBILITY_PUBLIC]: {
2020-04-08 14:13:33 +05:30
label: __('Public'),
2020-04-22 19:07:51 +05:30
icon: 'earth',
2020-04-08 14:13:33 +05:30
description: __('The snippet can be accessed without any authentication.'),
},
};