2020-03-10 12:08:16 +00:00
|
|
|
import { __ } from '~/locale';
|
2022-09-15 00:14:10 +00:00
|
|
|
import {
|
|
|
|
VISIBILITY_LEVEL_PRIVATE_STRING,
|
|
|
|
VISIBILITY_LEVEL_INTERNAL_STRING,
|
|
|
|
VISIBILITY_LEVEL_PUBLIC_STRING,
|
|
|
|
} from '~/visibility_level/constants';
|
2020-03-10 12:08:16 +00:00
|
|
|
|
|
|
|
export const SNIPPET_VISIBILITY = {
|
2022-09-15 00:14:10 +00:00
|
|
|
[VISIBILITY_LEVEL_PRIVATE_STRING]: {
|
2020-03-10 12:08:16 +00:00
|
|
|
label: __('Private'),
|
2020-04-01 09:07:45 +00:00
|
|
|
icon: 'lock',
|
2020-03-10 12:08:16 +00:00
|
|
|
description: __('The snippet is visible only to me.'),
|
|
|
|
description_project: __('The snippet is visible only to project members.'),
|
|
|
|
},
|
2022-09-15 00:14:10 +00:00
|
|
|
[VISIBILITY_LEVEL_INTERNAL_STRING]: {
|
2020-03-10 12:08:16 +00:00
|
|
|
label: __('Internal'),
|
2020-04-01 09:07:45 +00:00
|
|
|
icon: 'shield',
|
2020-10-30 15:08:59 +00:00
|
|
|
description: __('The snippet is visible to any logged in user except external users.'),
|
2020-03-10 12:08:16 +00:00
|
|
|
},
|
2022-09-15 00:14:10 +00:00
|
|
|
[VISIBILITY_LEVEL_PUBLIC_STRING]: {
|
2020-03-10 12:08:16 +00:00
|
|
|
label: __('Public'),
|
2020-04-01 09:07:45 +00:00
|
|
|
icon: 'earth',
|
2020-03-10 12:08:16 +00:00
|
|
|
description: __('The snippet can be accessed without any authentication.'),
|
|
|
|
},
|
|
|
|
};
|
2020-06-02 06:08:01 +00: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 09:09:43 +00: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 21:09:54 +00:00
|
|
|
export const SNIPPET_BLOB_ACTION_DELETE = 'delete';
|
2020-08-18 18:10:10 +00:00
|
|
|
|
|
|
|
export const SNIPPET_MAX_BLOBS = 10;
|
2020-09-05 00:08:43 +00:00
|
|
|
|
|
|
|
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.',
|
|
|
|
);
|