debian-mirror-gitlab/app/assets/javascripts/pages/projects/show/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

68 lines
2 KiB
JavaScript
Raw Normal View History

2018-12-05 23:21:45 +05:30
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
2022-07-16 23:28:13 +05:30
2021-09-04 01:27:46 +05:30
import initInviteMembersModal from '~/invite_members/init_invite_members_modal';
import initInviteMembersTrigger from '~/invite_members/init_invite_members_trigger';
2019-07-31 22:56:46 +05:30
import leaveByUrl from '~/namespaces/leave_by_url';
2021-03-11 19:13:27 +05:30
import initVueNotificationsDropdown from '~/notifications';
2022-03-02 08:16:31 +05:30
import Star from '~/projects/star';
2021-12-11 22:18:48 +05:30
import { initUploadFileTrigger } from '~/projects/upload_file';
2021-03-11 19:13:27 +05:30
import initReadMore from '~/read_more';
2021-01-03 14:25:43 +05:30
// Project show page loads different overview content based on user preferences
2021-04-17 20:07:23 +05:30
if (document.querySelector('.js-upload-blob-form')) {
2022-07-16 23:28:13 +05:30
import(/* webpackChunkName: 'blobBundle' */ '~/blob_edit/blob_bundle')
.then(({ initUploadForm }) => {
initUploadForm();
})
.catch(() => {});
2021-04-17 20:07:23 +05:30
}
if (document.getElementById('js-tree-list')) {
2022-07-16 23:28:13 +05:30
import(/* webpackChunkName: 'treeList' */ 'ee_else_ce/repository')
.then(({ default: initTree }) => {
initTree();
})
.catch(() => {});
2021-01-03 14:25:43 +05:30
}
if (document.querySelector('.blob-viewer')) {
2022-07-16 23:28:13 +05:30
import(/* webpackChunkName: 'blobViewer' */ '~/blob/viewer')
.then(({ BlobViewer }) => {
new BlobViewer(); // eslint-disable-line no-new
})
.catch(() => {});
2021-01-03 14:25:43 +05:30
}
if (document.querySelector('.project-show-activity')) {
2022-07-16 23:28:13 +05:30
import(/* webpackChunkName: 'activitiesList' */ '~/activities')
.then(({ default: Activities }) => {
new Activities(); // eslint-disable-line no-new
})
.catch(() => {});
2021-01-03 14:25:43 +05:30
}
leaveByUrl('project');
2021-03-11 19:13:27 +05:30
initVueNotificationsDropdown();
2021-01-03 14:25:43 +05:30
new ShortcutsNavigation(); // eslint-disable-line no-new
2021-01-29 00:20:46 +05:30
2021-04-17 20:07:23 +05:30
initUploadFileTrigger();
2021-09-04 01:27:46 +05:30
initInviteMembersModal();
initInviteMembersTrigger();
2022-07-16 23:28:13 +05:30
initReadMore();
new Star(); // eslint-disable-line no-new
if (document.querySelector('.js-autodevops-banner')) {
import(/* webpackChunkName: 'userCallOut' */ '~/user_callout')
.then(({ default: UserCallout }) => {
// eslint-disable-next-line no-new
new UserCallout({
setCalloutPerProject: false,
className: 'js-autodevops-banner',
});
})
.catch(() => {});
}