2020-03-12 03:34:54 +08:00
|
|
|
import './publicpath.js';
|
2020-02-24 05:34:28 +08:00
|
|
|
|
2021-10-15 10:35:26 +08:00
|
|
|
import {initVueEnv} from './components/VueComponentLoader.js';
|
|
|
|
import {initRepoActivityTopAuthorsChart} from './components/RepoActivityTopAuthors.vue';
|
|
|
|
import {initDashboardRepoList} from './components/DashboardRepoList.js';
|
|
|
|
|
2021-05-07 16:43:41 +08:00
|
|
|
import attachTribute from './features/tribute.js';
|
2021-10-17 01:28:04 +08:00
|
|
|
import initGlobalCopyToClipboardListener from './features/clipboard.js';
|
2020-03-12 03:34:54 +08:00
|
|
|
import initContextPopups from './features/contextpopup.js';
|
|
|
|
import initGitGraph from './features/gitgraph.js';
|
2020-11-19 06:00:16 +08:00
|
|
|
import initHeatmap from './features/heatmap.js';
|
2021-05-07 16:43:41 +08:00
|
|
|
import initImageDiff from './features/imagediff.js';
|
|
|
|
import initMigration from './features/migration.js';
|
2020-08-17 11:07:38 +08:00
|
|
|
import initProject from './features/projects.js';
|
2020-05-22 09:45:34 +08:00
|
|
|
import initServiceWorker from './features/serviceworker.js';
|
2020-06-25 06:23:05 +08:00
|
|
|
import initTableSort from './features/tablesort.js';
|
2021-10-13 02:11:35 +08:00
|
|
|
import {initAdminUserListSearchForm} from './features/admin-users.js';
|
2021-05-07 16:43:41 +08:00
|
|
|
import {initMarkupAnchors} from './markup/anchors.js';
|
2021-10-17 01:28:04 +08:00
|
|
|
import {initNotificationCount, initNotificationsTable} from './features/notification.js';
|
2021-10-08 21:08:22 +08:00
|
|
|
import {initLastCommitLoader} from './features/lastcommitloader.js';
|
2021-10-11 06:40:03 +08:00
|
|
|
import {initIssueContentHistory} from './features/issue-content-history.js';
|
2021-01-21 22:51:52 +08:00
|
|
|
import {initStopwatch} from './features/stopwatch.js';
|
2021-10-16 00:05:33 +08:00
|
|
|
import {initDiffShowMore} from './features/diff.js';
|
2021-10-17 01:28:04 +08:00
|
|
|
import {initCommentContent, initMarkupContent} from './markup/content.js';
|
|
|
|
|
|
|
|
import {initUserAuthLinkAccountView, initUserAuthOauth2} from './features/user-auth.js';
|
|
|
|
import {
|
|
|
|
initRepoDiffConversationForm,
|
|
|
|
initRepoDiffFileViewToggle,
|
|
|
|
initRepoDiffReviewButton,
|
|
|
|
} from './features/repo-diff.js';
|
|
|
|
import {
|
|
|
|
initRepoIssueDue,
|
|
|
|
initRepoIssueList,
|
|
|
|
initRepoIssueReferenceRepositorySearch,
|
|
|
|
initRepoIssueTimeTracking,
|
|
|
|
initRepoIssueWipTitle,
|
|
|
|
initRepoPullRequestMergeInstruction,
|
|
|
|
initRepoPullRequestReview,
|
|
|
|
} from './features/repo-issue.js';
|
|
|
|
import {initRepoCommitButton} from './features/repo-commit.js';
|
|
|
|
import {
|
|
|
|
initFootLanguageMenu,
|
|
|
|
initGlobalButtonClickOnEnter,
|
|
|
|
initGlobalButtons,
|
|
|
|
initGlobalCommon,
|
|
|
|
initGlobalDropzone,
|
|
|
|
initGlobalEnterQuickSubmit,
|
|
|
|
initGlobalFormDirtyLeaveConfirm,
|
|
|
|
initGlobalLinkActions,
|
|
|
|
initHeadNavbarContentToggle,
|
|
|
|
} from './features/common-global.js';
|
|
|
|
import {initRepoTopicBar} from './features/repo-home.js';
|
|
|
|
import {initAdminEmails} from './features/admin-emails.js';
|
|
|
|
import {initAdminCommon} from './features/admin-common.js';
|
|
|
|
import {initRepoTemplateSearch} from './features/repo-template.js';
|
|
|
|
import {initRepoCodeView} from './features/repo-code.js';
|
|
|
|
import {initSshKeyFormParser} from './features/sshkey-helper.js';
|
|
|
|
import {initUserSettings} from './features/user-settings.js';
|
|
|
|
import {initRepoArchiveLinks} from './features/repo-common.js';
|
|
|
|
import {initRepoMigrationStatusChecker} from './features/repo-migrate.js';
|
|
|
|
import {
|
|
|
|
initRepoSettingGitHook,
|
|
|
|
initRepoSettingsCollaboration,
|
|
|
|
initRepoSettingSearchTeamBox,
|
|
|
|
} from './features/repo-settings.js';
|
|
|
|
import {initOrgTeamSearchRepoBox, initOrgTeamSettings} from './features/org-team.js';
|
|
|
|
import {initUserAuthU2fAuth, initUserAuthU2fRegister} from './features/user-auth-u2f.js';
|
|
|
|
import {initRepoRelease, initRepoReleaseEditor} from './features/repo-release.js';
|
|
|
|
import {initRepoEditor} from './features/repo-editor.js';
|
|
|
|
import {initSearchUserBox} from './features/comp/SearchUserBox.js';
|
|
|
|
import {initInstall} from './features/install.js';
|
|
|
|
import {initWebHookEditor} from './features/comp/WebHookEditor.js';
|
|
|
|
import {initCommonIssue} from './features/common-issue.js';
|
|
|
|
import {initRepoBranchButton} from './features/repo-branch.js';
|
|
|
|
import {initCommonOrganization} from './features/common-organization.js';
|
|
|
|
import {initRepoWikiForm} from './features/repo-wiki.js';
|
|
|
|
import {initRepoCommentForm, initRepository} from './features/repo-legacy.js';
|
2019-11-13 22:52:13 +08:00
|
|
|
|
2020-01-12 10:57:32 +08:00
|
|
|
// Silence fomantic's error logging when tabs are used without a target content element
|
|
|
|
$.fn.tab.settings.silent = true;
|
2019-11-15 05:39:51 +08:00
|
|
|
|
2021-10-17 01:28:04 +08:00
|
|
|
initVueEnv();
|
2021-02-22 09:14:27 +08:00
|
|
|
|
2020-01-29 05:57:20 +08:00
|
|
|
$(document).ready(async () => {
|
2021-10-17 01:28:04 +08:00
|
|
|
initGlobalCommon();
|
|
|
|
initGlobalDropzone();
|
|
|
|
initGlobalLinkActions();
|
|
|
|
initGlobalButtons();
|
|
|
|
initRepoBranchButton();
|
2019-11-15 05:39:51 +08:00
|
|
|
|
2021-10-17 01:28:04 +08:00
|
|
|
initCommonIssue();
|
2019-11-15 05:39:51 +08:00
|
|
|
|
2021-10-17 01:28:04 +08:00
|
|
|
initSearchUserBox();
|
|
|
|
initRepoSettingSearchTeamBox();
|
|
|
|
initOrgTeamSearchRepoBox();
|
2019-11-15 05:39:51 +08:00
|
|
|
|
2021-10-17 01:28:04 +08:00
|
|
|
initGlobalButtonClickOnEnter();
|
2021-05-07 16:43:41 +08:00
|
|
|
initMarkupAnchors();
|
2021-05-23 22:14:03 +08:00
|
|
|
initCommentContent();
|
2021-10-17 01:28:04 +08:00
|
|
|
initRepoCommentForm();
|
2019-11-15 05:39:51 +08:00
|
|
|
initInstall();
|
2021-10-17 01:28:04 +08:00
|
|
|
initRepoArchiveLinks();
|
2019-11-15 05:39:51 +08:00
|
|
|
initRepository();
|
|
|
|
initMigration();
|
2021-10-17 01:28:04 +08:00
|
|
|
initRepoWikiForm();
|
|
|
|
initRepoEditor();
|
|
|
|
initCommonOrganization();
|
|
|
|
initWebHookEditor();
|
|
|
|
initAdminCommon();
|
|
|
|
initRepoCodeView();
|
2021-10-15 10:35:26 +08:00
|
|
|
initRepoActivityTopAuthorsChart();
|
|
|
|
initDashboardRepoList();
|
2021-10-17 01:28:04 +08:00
|
|
|
initOrgTeamSettings();
|
|
|
|
initGlobalEnterQuickSubmit();
|
|
|
|
initHeadNavbarContentToggle();
|
|
|
|
initFootLanguageMenu();
|
|
|
|
initRepoTopicBar();
|
|
|
|
initUserAuthU2fAuth();
|
|
|
|
initUserAuthU2fRegister();
|
|
|
|
initRepoIssueList();
|
|
|
|
initRepoIssueTimeTracking();
|
|
|
|
initRepoIssueDue();
|
|
|
|
initRepoIssueWipTitle();
|
|
|
|
initRepoPullRequestReview();
|
|
|
|
initRepoMigrationStatusChecker();
|
|
|
|
initRepoTemplateSearch();
|
|
|
|
initRepoIssueReferenceRepositorySearch();
|
2020-02-12 09:53:18 +08:00
|
|
|
initContextPopups();
|
2020-06-25 06:23:05 +08:00
|
|
|
initTableSort();
|
2020-04-24 11:57:38 +08:00
|
|
|
initNotificationsTable();
|
2021-10-08 21:08:22 +08:00
|
|
|
initLastCommitLoader();
|
2021-10-17 01:28:04 +08:00
|
|
|
initRepoPullRequestMergeInstruction();
|
|
|
|
initRepoDiffFileViewToggle();
|
|
|
|
initRepoReleaseEditor();
|
|
|
|
initRepoRelease();
|
2021-10-16 00:05:33 +08:00
|
|
|
initDiffShowMore();
|
2021-10-11 06:40:03 +08:00
|
|
|
initIssueContentHistory();
|
2021-10-13 02:11:35 +08:00
|
|
|
initAdminUserListSearchForm();
|
2021-10-17 01:28:04 +08:00
|
|
|
initGlobalCopyToClipboardListener();
|
|
|
|
initUserAuthOauth2();
|
|
|
|
initRepoDiffReviewButton();
|
|
|
|
initRepoCommitButton();
|
|
|
|
initAdminEmails();
|
|
|
|
initGlobalEnterQuickSubmit();
|
|
|
|
initSshKeyFormParser();
|
|
|
|
initGlobalFormDirtyLeaveConfirm();
|
|
|
|
initUserSettings();
|
|
|
|
initRepoSettingsCollaboration();
|
|
|
|
initUserAuthLinkAccountView();
|
|
|
|
initRepoDiffConversationForm();
|
2019-11-15 05:39:51 +08:00
|
|
|
|
2020-05-24 15:36:40 +08:00
|
|
|
// parallel init of async loaded features
|
2020-04-13 21:02:31 +08:00
|
|
|
await Promise.all([
|
2020-05-21 10:00:43 +08:00
|
|
|
attachTribute(document.querySelectorAll('#content, .emoji-input')),
|
2020-02-08 07:03:42 +08:00
|
|
|
initGitGraph(),
|
2020-11-19 06:00:16 +08:00
|
|
|
initHeatmap(),
|
2020-08-17 11:07:38 +08:00
|
|
|
initProject(),
|
2020-05-22 09:45:34 +08:00
|
|
|
initServiceWorker(),
|
2020-07-03 17:55:36 +08:00
|
|
|
initNotificationCount(),
|
2021-01-21 22:51:52 +08:00
|
|
|
initStopwatch(),
|
2021-05-23 22:14:03 +08:00
|
|
|
initMarkupContent(),
|
2021-10-17 01:28:04 +08:00
|
|
|
initRepoSettingGitHook(),
|
2021-02-28 01:25:00 +08:00
|
|
|
initImageDiff(),
|
2020-01-29 05:57:20 +08:00
|
|
|
]);
|
2019-11-15 05:39:51 +08:00
|
|
|
});
|