2020-03-10 08:08:16 -04:00
|
|
|
import { __ } from '~/locale';
|
|
|
|
|
2020-01-31 10:08:42 -05:00
|
|
|
export const SNIPPET_VISIBILITY_PRIVATE = 'private';
|
|
|
|
export const SNIPPET_VISIBILITY_INTERNAL = 'internal';
|
|
|
|
export const SNIPPET_VISIBILITY_PUBLIC = 'public';
|
2020-03-10 08:08:16 -04:00
|
|
|
|
|
|
|
export const SNIPPET_VISIBILITY = {
|
2020-04-01 05:07:45 -04:00
|
|
|
[SNIPPET_VISIBILITY_PRIVATE]: {
|
2020-03-10 08:08:16 -04:00
|
|
|
label: __('Private'),
|
2020-04-01 05:07:45 -04:00
|
|
|
icon: 'lock',
|
2020-03-10 08:08:16 -04:00
|
|
|
description: __('The snippet is visible only to me.'),
|
|
|
|
description_project: __('The snippet is visible only to project members.'),
|
|
|
|
},
|
2020-04-01 05:07:45 -04:00
|
|
|
[SNIPPET_VISIBILITY_INTERNAL]: {
|
2020-03-10 08:08:16 -04:00
|
|
|
label: __('Internal'),
|
2020-04-01 05:07:45 -04:00
|
|
|
icon: 'shield',
|
2020-03-10 08:08:16 -04:00
|
|
|
description: __('The snippet is visible to any logged in user.'),
|
|
|
|
},
|
2020-04-01 05:07:45 -04:00
|
|
|
[SNIPPET_VISIBILITY_PUBLIC]: {
|
2020-03-10 08:08:16 -04:00
|
|
|
label: __('Public'),
|
2020-04-01 05:07:45 -04:00
|
|
|
icon: 'earth',
|
2020-03-10 08:08:16 -04:00
|
|
|
description: __('The snippet can be accessed without any authentication.'),
|
|
|
|
},
|
|
|
|
};
|
2020-06-02 02:08:01 -04:00
|
|
|
|
|
|
|
export const SNIPPET_CREATE_MUTATION_ERROR = __("Can't create snippet: %{err}");
|
|
|
|
export const SNIPPET_UPDATE_MUTATION_ERROR = __("Can't update snippet: %{err}");
|
2020-07-17 05:09:43 -04:00
|
|
|
export const SNIPPET_BLOB_CONTENT_FETCH_ERROR = __("Can't fetch content for the blob: %{err}");
|
|
|
|
|
|
|
|
export const SNIPPET_BLOB_ACTION_CREATE = 'create';
|
|
|
|
export const SNIPPET_BLOB_ACTION_UPDATE = 'update';
|
|
|
|
export const SNIPPET_BLOB_ACTION_MOVE = 'move';
|
2020-08-12 17:09:54 -04:00
|
|
|
export const SNIPPET_BLOB_ACTION_DELETE = 'delete';
|
2020-08-18 14:10:10 -04:00
|
|
|
|
|
|
|
export const SNIPPET_MAX_BLOBS = 10;
|
2020-09-04 20:08:43 -04:00
|
|
|
|
|
|
|
export const SNIPPET_LEVELS_MAP = {
|
|
|
|
0: SNIPPET_VISIBILITY_PRIVATE,
|
|
|
|
10: SNIPPET_VISIBILITY_INTERNAL,
|
|
|
|
20: SNIPPET_VISIBILITY_PUBLIC,
|
|
|
|
};
|
|
|
|
export const SNIPPET_LEVELS_RESTRICTED = __(
|
|
|
|
'Other visibility settings have been disabled by the administrator.',
|
|
|
|
);
|
|
|
|
export const SNIPPET_LEVELS_DISABLED = __(
|
|
|
|
'Visibility settings have been disabled by the administrator.',
|
|
|
|
);
|