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

47 lines
1.3 KiB
JavaScript
Raw Normal View History

2020-10-24 23:57:45 +05:30
import initTree from 'ee_else_ce/repository';
2021-03-11 19:13:27 +05:30
import Activities from '~/activities';
2018-12-05 23:21:45 +05:30
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
2018-03-17 18:26:18 +05:30
import BlobViewer from '~/blob/viewer/index';
2021-03-11 19:13:27 +05:30
import { initUploadForm } from '~/blob_edit/blob_bundle';
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';
2021-04-17 20:07:23 +05:30
import { initUploadFileTrigger } from '~/projects/upload_file_experiment';
2021-03-11 19:13:27 +05:30
import initReadMore from '~/read_more';
import UserCallout from '~/user_callout';
import Star from '../../../star';
2018-03-17 18:26:18 +05:30
2021-01-03 14:25:43 +05:30
initReadMore();
new Star(); // eslint-disable-line no-new
// eslint-disable-next-line no-new
new UserCallout({
setCalloutPerProject: false,
className: 'js-autodevops-banner',
2018-03-17 18:26:18 +05:30
});
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')) {
2021-02-22 17:27:13 +05:30
initUploadForm();
2021-04-17 20:07:23 +05:30
}
if (document.getElementById('js-tree-list')) {
2021-01-03 14:25:43 +05:30
initTree();
}
if (document.querySelector('.blob-viewer')) {
new BlobViewer(); // eslint-disable-line no-new
}
if (document.querySelector('.project-show-activity')) {
new Activities(); // eslint-disable-line no-new
}
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();