gitlab-org--gitlab-foss/app/assets/javascripts/ide/constants.js
Paul Slaughter 218430bdde
Create constants for IDE commit action values
**Why?**
These values will be used to help build the mirroring diff.
It is helpful keeping it controlled in a constant.

**Links:**
- https://gitlab.com/gitlab-org/gitlab-ee/issues/10232
- https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/11478
2019-04-24 03:45:03 -05:00

82 lines
1.7 KiB
JavaScript

export const MAX_WINDOW_HEIGHT_COMPACT = 750;
// Commit message textarea
export const MAX_TITLE_LENGTH = 50;
export const MAX_BODY_LENGTH = 72;
export const activityBarViews = {
edit: 'ide-tree',
commit: 'commit-section',
review: 'ide-review',
};
export const viewerTypes = {
mr: 'mrdiff',
edit: 'editor',
diff: 'diff',
};
export const diffModes = {
replaced: 'replaced',
new: 'new',
deleted: 'deleted',
renamed: 'renamed',
mode_changed: 'mode_changed',
};
export const diffViewerModes = Object.freeze({
not_diffable: 'not_diffable',
no_preview: 'no_preview',
added: 'added',
deleted: 'deleted',
renamed: 'renamed',
mode_changed: 'mode_changed',
text: 'text',
image: 'image',
});
export const diffViewerErrors = Object.freeze({
too_large: 'too_large',
stored_externally: 'server_side_but_stored_externally',
});
export const rightSidebarViews = {
pipelines: { name: 'pipelines-list', keepAlive: true },
jobsDetail: { name: 'jobs-detail', keepAlive: false },
mergeRequestInfo: { name: 'merge-request-info', keepAlive: true },
clientSidePreview: { name: 'clientside', keepAlive: false },
};
export const stageKeys = {
unstaged: 'unstaged',
staged: 'staged',
};
export const commitItemIconMap = {
addition: {
icon: 'file-addition',
class: 'ide-file-addition',
},
modified: {
icon: 'file-modified',
class: 'ide-file-modified',
},
deleted: {
icon: 'file-deletion',
class: 'ide-file-deletion',
},
};
export const modalTypes = {
rename: 'rename',
tree: 'tree',
};
export const commitActionTypes = {
move: 'move',
delete: 'delete',
create: 'create',
update: 'update',
};
export const packageJsonPath = 'package.json';