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

85 lines
2.5 KiB
JavaScript
Raw Normal View History

2022-06-21 17:19:12 +05:30
import { __, s__ } from '~/locale';
2022-08-27 11:52:29 +05:30
import {
2022-10-11 01:57:18 +05:30
VISIBILITY_LEVEL_PRIVATE_STRING,
VISIBILITY_LEVEL_INTERNAL_STRING,
VISIBILITY_LEVEL_PUBLIC_STRING,
2022-08-27 11:52:29 +05:30
} from '~/visibility_level/constants';
2018-03-17 18:26:18 +05:30
export const MAX_CHILDREN_COUNT = 20;
2018-11-20 20:47:30 +05:30
export const ACTIVE_TAB_SUBGROUPS_AND_PROJECTS = 'subgroups_and_projects';
export const ACTIVE_TAB_SHARED = 'shared';
export const ACTIVE_TAB_ARCHIVED = 'archived';
export const GROUPS_LIST_HOLDER_CLASS = '.js-groups-list-holder';
2020-04-22 19:07:51 +05:30
export const CONTENT_LIST_CLASS = '.groups-list';
2018-11-20 20:47:30 +05:30
2018-03-17 18:26:18 +05:30
export const COMMON_STR = {
FAILURE: __('An error occurred. Please try again.'),
2018-11-20 20:47:30 +05:30
LEAVE_FORBIDDEN: s__(
'GroupsTree|Failed to leave the group. Please make sure you are not the only owner.',
),
2022-04-04 11:22:00 +05:30
LEAVE_BTN_TITLE: s__('GroupsTree|Leave group'),
EDIT_BTN_TITLE: s__('GroupsTree|Edit'),
REMOVE_BTN_TITLE: s__('GroupsTree|Delete'),
OPTIONS_DROPDOWN_TITLE: s__('GroupsTree|Options'),
2018-03-17 18:26:18 +05:30
};
export const ITEM_TYPE = {
PROJECT: 'project',
GROUP: 'group',
};
export const GROUP_VISIBILITY_TYPE = {
2022-10-11 01:57:18 +05:30
[VISIBILITY_LEVEL_PUBLIC_STRING]: __(
2018-11-20 20:47:30 +05:30
'Public - The group and any public projects can be viewed without any authentication.',
),
2022-10-11 01:57:18 +05:30
[VISIBILITY_LEVEL_INTERNAL_STRING]: __(
2021-01-29 00:20:46 +05:30
'Internal - The group and any internal projects can be viewed by any logged in user except external users.',
2018-11-20 20:47:30 +05:30
),
2022-10-11 01:57:18 +05:30
[VISIBILITY_LEVEL_PRIVATE_STRING]: __(
2022-08-27 11:52:29 +05:30
'Private - The group and its projects can only be viewed by members.',
),
2018-03-17 18:26:18 +05:30
};
export const PROJECT_VISIBILITY_TYPE = {
2022-10-11 01:57:18 +05:30
[VISIBILITY_LEVEL_PUBLIC_STRING]: __(
'Public - The project can be accessed without any authentication.',
),
[VISIBILITY_LEVEL_INTERNAL_STRING]: __(
2021-01-29 00:20:46 +05:30
'Internal - The project can be accessed by any logged in user except external users.',
),
2022-10-11 01:57:18 +05:30
[VISIBILITY_LEVEL_PRIVATE_STRING]: __(
2020-04-08 14:13:33 +05:30
'Private - Project access must be granted explicitly to each user. If this project is part of a group, access will be granted to members of the group.',
),
2018-03-17 18:26:18 +05:30
};
export const VISIBILITY_TYPE_ICON = {
2022-10-11 01:57:18 +05:30
[VISIBILITY_LEVEL_PUBLIC_STRING]: 'earth',
[VISIBILITY_LEVEL_INTERNAL_STRING]: 'shield',
[VISIBILITY_LEVEL_PRIVATE_STRING]: 'lock',
2018-03-17 18:26:18 +05:30
};
2022-11-25 23:54:43 +05:30
export const OVERVIEW_TABS_SORTING_ITEMS = [
{
label: __('Name'),
asc: 'name_asc',
desc: 'name_desc',
},
{
label: __('Created'),
asc: 'created_asc',
desc: 'created_desc',
},
{
label: __('Updated'),
asc: 'latest_activity_asc',
desc: 'latest_activity_desc',
},
{
label: __('Stars'),
asc: 'stars_asc',
desc: 'stars_desc',
},
];