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

55 lines
1.7 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';
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';
import NotificationsForm from '~/notifications_form';
import initReadMore from '~/read_more';
import UserCallout from '~/user_callout';
2018-03-17 18:26:18 +05:30
import notificationsDropdown from '../../../notifications_dropdown';
2021-03-11 19:13:27 +05:30
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
new NotificationsForm(); // 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
const treeSlider = document.getElementById('js-tree-list');
if (treeSlider) {
2021-02-22 17:27:13 +05:30
initUploadForm();
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
if (gon.features?.vueNotificationDropdown) {
initVueNotificationsDropdown();
} else {
notificationsDropdown();
}
initVueNotificationsDropdown();
2021-01-03 14:25:43 +05:30
new ShortcutsNavigation(); // eslint-disable-line no-new
2021-01-29 00:20:46 +05:30
initInviteMembersTrigger();
initInviteMembersModal();