2021-02-22 17:27:13 +05:30
|
|
|
import { __ } from '~/locale';
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
export const DISCUSSION_NOTE = 'DiscussionNote';
|
2018-03-27 19:54:05 +05:30
|
|
|
export const DIFF_NOTE = 'DiffNote';
|
2018-03-17 18:26:18 +05:30
|
|
|
export const DISCUSSION = 'discussion';
|
|
|
|
export const NOTE = 'note';
|
|
|
|
export const SYSTEM_NOTE = 'systemNote';
|
|
|
|
export const COMMENT = 'comment';
|
|
|
|
export const OPENED = 'opened';
|
|
|
|
export const REOPENED = 'reopened';
|
|
|
|
export const CLOSED = 'closed';
|
2019-07-31 22:56:46 +05:30
|
|
|
export const MERGED = 'merged';
|
2022-08-13 15:12:31 +05:30
|
|
|
export const ISSUE_NOTEABLE_TYPE = 'Issue';
|
|
|
|
export const EPIC_NOTEABLE_TYPE = 'Epic';
|
2018-11-08 19:23:39 +05:30
|
|
|
export const MERGE_REQUEST_NOTEABLE_TYPE = 'MergeRequest';
|
2018-03-27 19:54:05 +05:30
|
|
|
export const UNRESOLVE_NOTE_METHOD_NAME = 'delete';
|
|
|
|
export const RESOLVE_NOTE_METHOD_NAME = 'post';
|
2018-11-08 19:23:39 +05:30
|
|
|
export const DESCRIPTION_TYPE = 'changed the description';
|
2018-12-13 13:39:08 +05:30
|
|
|
export const DISCUSSION_FILTERS_DEFAULT_VALUE = 0;
|
2021-01-03 14:25:43 +05:30
|
|
|
export const COMMENTS_ONLY_FILTER_VALUE = 1;
|
|
|
|
export const HISTORY_ONLY_FILTER_VALUE = 2;
|
2019-02-15 15:39:39 +05:30
|
|
|
export const DISCUSSION_TAB_LABEL = 'show';
|
2019-12-21 20:55:43 +05:30
|
|
|
export const NOTE_UNDERSCORE = 'note_';
|
2020-03-13 15:44:24 +05:30
|
|
|
export const TIME_DIFFERENCE_VALUE = 10;
|
2020-04-22 19:07:51 +05:30
|
|
|
export const ASC = 'asc';
|
|
|
|
export const DESC = 'desc';
|
2018-05-09 12:01:36 +05:30
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
export const DISCUSSION_FETCH_TIMEOUT = 750;
|
|
|
|
|
2018-05-09 12:01:36 +05:30
|
|
|
export const NOTEABLE_TYPE_MAPPING = {
|
|
|
|
Issue: ISSUE_NOTEABLE_TYPE,
|
|
|
|
MergeRequest: MERGE_REQUEST_NOTEABLE_TYPE,
|
|
|
|
Epic: EPIC_NOTEABLE_TYPE,
|
|
|
|
};
|
2019-07-07 11:18:12 +05:30
|
|
|
|
|
|
|
export const DISCUSSION_FILTER_TYPES = {
|
|
|
|
ALL: 'all',
|
|
|
|
COMMENTS: 'comments',
|
|
|
|
HISTORY: 'history',
|
|
|
|
};
|
2021-02-22 17:27:13 +05:30
|
|
|
|
|
|
|
export const toggleStateErrorMessage = {
|
|
|
|
Epic: {
|
|
|
|
[CLOSED]: __('Something went wrong while reopening the epic. Please try again later.'),
|
|
|
|
[OPENED]: __('Something went wrong while closing the epic. Please try again later.'),
|
|
|
|
[REOPENED]: __('Something went wrong while closing the epic. Please try again later.'),
|
|
|
|
},
|
|
|
|
MergeRequest: {
|
|
|
|
[CLOSED]: __('Something went wrong while reopening the merge request. Please try again later.'),
|
|
|
|
[OPENED]: __('Something went wrong while closing the merge request. Please try again later.'),
|
|
|
|
[REOPENED]: __('Something went wrong while closing the merge request. Please try again later.'),
|
|
|
|
},
|
|
|
|
};
|
2022-07-23 23:45:48 +05:30
|
|
|
|
|
|
|
export const INTERNAL_NOTE_CLASSES = ['gl-bg-orange-50', 'gl-px-4', 'gl-py-2'];
|