summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages/projects/show/index.js
blob: 71c6773c176315e065577a6ad89e054c63ffcad3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import initTree from 'ee_else_ce/repository';
import Activities from '~/activities';
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
import { BlobViewer } from '~/blob/viewer';
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';
import leaveByUrl from '~/namespaces/leave_by_url';
import initVueNotificationsDropdown from '~/notifications';
import Star from '~/projects/star';
import { initUploadFileTrigger } from '~/projects/upload_file';
import initReadMore from '~/read_more';
import UserCallout from '~/user_callout';

initReadMore();
new Star(); // eslint-disable-line no-new

// eslint-disable-next-line no-new
new UserCallout({
  setCalloutPerProject: false,
  className: 'js-autodevops-banner',
});

// Project show page loads different overview content based on user preferences

if (document.querySelector('.js-upload-blob-form')) {
  initUploadForm();
}

if (document.getElementById('js-tree-list')) {
  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');

initVueNotificationsDropdown();

new ShortcutsNavigation(); // eslint-disable-line no-new

initUploadFileTrigger();
initInviteMembersModal();
initInviteMembersTrigger();