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

79 lines
2.3 KiB
JavaScript
Raw Normal View History

2021-09-30 23:02:18 +05:30
import { __ } from '~/locale';
2021-09-04 01:27:46 +05:30
2021-09-30 23:02:18 +05:30
export const TREE_PAGE_LIMIT = 1000; // the maximum amount of items per page
2021-09-04 01:27:46 +05:30
export const TREE_PAGE_SIZE = 100; // the amount of items to be fetched per (batch) request
export const TREE_INITIAL_FETCH_COUNT = TREE_PAGE_LIMIT / TREE_PAGE_SIZE; // the amount of (batch) requests to make
2021-09-30 23:02:18 +05:30
2021-11-18 22:05:49 +05:30
export const COMMIT_BATCH_SIZE = 25; // we request commit data in batches of 25
2021-09-30 23:02:18 +05:30
export const SECONDARY_OPTIONS_TEXT = __('Cancel');
export const COMMIT_LABEL = __('Commit message');
export const TARGET_BRANCH_LABEL = __('Target branch');
export const TOGGLE_CREATE_MR_LABEL = __('Start a new merge request with these changes');
2021-11-18 22:05:49 +05:30
export const NEW_BRANCH_IN_FORK = __(
2022-01-26 12:08:38 +05:30
'GitLab will create a branch in your fork and start a merge request.',
2021-11-18 22:05:49 +05:30
);
2021-10-27 15:23:28 +05:30
export const COMMIT_MESSAGE_SUBJECT_MAX_LENGTH = 52;
export const COMMIT_MESSAGE_BODY_MAX_LENGTH = 72;
2021-11-11 11:23:49 +05:30
export const LIMITED_CONTAINER_WIDTH_CLASS = 'limit-container-width';
2021-11-18 22:05:49 +05:30
export const I18N_COMMIT_DATA_FETCH_ERROR = __('An error occurred while fetching commit data.');
2022-01-26 12:08:38 +05:30
export const PDF_MAX_FILE_SIZE = 10000000; // 10 MB
export const PDF_MAX_PAGE_LIMIT = 50;
export const ROW_APPEAR_DELAY = 150;
2022-04-04 11:22:00 +05:30
export const DEFAULT_BLOB_INFO = {
userPermissions: {
pushCode: false,
downloadCode: false,
createMergeRequestIn: false,
forkProject: false,
},
pathLocks: {
nodes: [],
},
repository: {
empty: true,
blobs: {
nodes: [
{
name: '',
size: '',
rawTextBlob: '',
type: '',
fileType: '',
tooLarge: false,
path: '',
editBlobPath: '',
ideEditPath: '',
forkAndEditPath: '',
ideForkAndEditPath: '',
storedExternally: false,
externalStorage: '',
environmentFormattedExternalUrl: '',
environmentExternalUrlForRouteMap: '',
canModifyBlob: false,
canCurrentUserPushToBranch: false,
archived: false,
rawPath: '',
externalStorageUrl: '',
replacePath: '',
pipelineEditorPath: '',
deletePath: '',
simpleViewer: {},
richViewer: null,
webPath: '',
},
],
},
},
};
export const TEXT_FILE_TYPE = 'text';
export const LFS_STORAGE = 'lfs';