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

77 lines
2.1 KiB
JavaScript
Raw Normal View History

2022-01-26 12:08:38 +05:30
import { s__ } from '~/locale';
2021-11-11 11:23:49 +05:30
2022-01-26 12:08:38 +05:30
export const MSG_ISSUES_ASSIGNED_TO_ME = s__('GlobalSearch|Issues assigned to me');
2021-11-11 11:23:49 +05:30
2022-01-26 12:08:38 +05:30
export const MSG_ISSUES_IVE_CREATED = s__("GlobalSearch|Issues I've created");
2021-11-11 11:23:49 +05:30
2022-01-26 12:08:38 +05:30
export const MSG_MR_ASSIGNED_TO_ME = s__('GlobalSearch|Merge requests assigned to me');
2021-11-11 11:23:49 +05:30
2022-01-26 12:08:38 +05:30
export const MSG_MR_IM_REVIEWER = s__("GlobalSearch|Merge requests that I'm a reviewer");
2021-11-11 11:23:49 +05:30
2022-01-26 12:08:38 +05:30
export const MSG_MR_IVE_CREATED = s__("GlobalSearch|Merge requests I've created");
2021-11-11 11:23:49 +05:30
2022-08-13 15:12:31 +05:30
export const MSG_IN_ALL_GITLAB = s__('GlobalSearch|all GitLab');
2021-11-11 11:23:49 +05:30
2022-08-13 15:12:31 +05:30
export const MSG_IN_GROUP = s__('GlobalSearch|group');
2021-11-11 11:23:49 +05:30
2022-08-13 15:12:31 +05:30
export const MSG_IN_PROJECT = s__('GlobalSearch|project');
2021-11-18 22:05:49 +05:30
2022-08-13 15:12:31 +05:30
export const ICON_PROJECT = 'project';
2021-11-18 22:05:49 +05:30
2022-08-13 15:12:31 +05:30
export const ICON_GROUP = 'group';
export const ICON_SUBGROUP = 'subgroup';
export const GROUPS_CATEGORY = s__('GlobalSearch|Groups');
export const PROJECTS_CATEGORY = s__('GlobalSearch|Projects');
2021-11-18 22:05:49 +05:30
2022-10-11 01:57:18 +05:30
export const ISSUES_CATEGORY = s__('GlobalSearch|Recent issues');
2022-06-21 17:19:12 +05:30
2022-10-11 01:57:18 +05:30
export const MERGE_REQUEST_CATEGORY = s__('GlobalSearch|Recent merge requests');
2022-06-21 17:19:12 +05:30
2022-10-11 01:57:18 +05:30
export const RECENT_EPICS_CATEGORY = s__('GlobalSearch|Recent epics');
export const IN_THIS_PROJECT_CATEGORY = s__('GlobalSearch|In this project');
export const SETTINGS_CATEGORY = s__('GlobalSearch|Settings');
export const HELP_CATEGORY = s__('GlobalSearch|Help');
2022-06-21 17:19:12 +05:30
2021-11-18 22:05:49 +05:30
export const LARGE_AVATAR_PX = 32;
export const SMALL_AVATAR_PX = 16;
2022-01-26 12:08:38 +05:30
export const FIRST_DROPDOWN_INDEX = 0;
export const SEARCH_BOX_INDEX = -1;
2022-06-21 17:19:12 +05:30
export const SEARCH_SHORTCUTS_MIN_CHARACTERS = 2;
2022-01-26 12:08:38 +05:30
export const SEARCH_INPUT_DESCRIPTION = 'search-input-description';
export const SEARCH_RESULTS_DESCRIPTION = 'search-results-description';
2022-08-13 15:12:31 +05:30
export const SCOPE_TOKEN_MAX_LENGTH = 36;
export const INPUT_FIELD_PADDING = 52;
export const HEADER_INIT_EVENTS = ['input', 'focus'];
2022-08-27 11:52:29 +05:30
export const IS_SEARCHING = 'is-searching';
export const IS_FOCUSED = 'is-focused';
export const IS_NOT_FOCUSED = 'is-not-focused';
2022-10-11 01:57:18 +05:30
export const DROPDOWN_ORDER = [
MERGE_REQUEST_CATEGORY,
ISSUES_CATEGORY,
RECENT_EPICS_CATEGORY,
GROUPS_CATEGORY,
PROJECTS_CATEGORY,
IN_THIS_PROJECT_CATEGORY,
SETTINGS_CATEGORY,
HELP_CATEGORY,
];
export const FETCH_TYPES = ['generic', 'search'];