|
1 | 1 | // bootstrap module must be the first one to be imported, it handles webpack lazy-loading and global errors |
2 | 2 | import './bootstrap.ts'; |
3 | | -import './htmx.ts'; |
| 3 | +import './webcomponents/index.ts'; |
| 4 | +import {onDomReady} from './utils/dom.ts'; |
4 | 5 |
|
5 | | -import {initDashboardRepoList} from './features/dashboard.ts'; |
6 | | -import {initGlobalCopyToClipboardListener} from './features/clipboard.ts'; |
7 | | -import {initContextPopups} from './features/contextpopup.ts'; |
8 | | -import {initRepoGraphGit} from './features/repo-graph.ts'; |
9 | | -import {initHeatmap} from './features/heatmap.ts'; |
10 | | -import {initImageDiff} from './features/imagediff.ts'; |
11 | | -import {initRepoMigration} from './features/repo-migration.ts'; |
12 | | -import {initRepoProject} from './features/repo-projects.ts'; |
13 | | -import {initTableSort} from './features/tablesort.ts'; |
14 | | -import {initAdminUserListSearchForm} from './features/admin/users.ts'; |
15 | | -import {initAdminConfigs} from './features/admin/config.ts'; |
16 | | -import {initMarkupAnchors} from './markup/anchors.ts'; |
17 | | -import {initNotificationCount, initNotificationsTable} from './features/notification.ts'; |
18 | | -import {initRepoIssueContentHistory} from './features/repo-issue-content.ts'; |
19 | | -import {initStopwatch} from './features/stopwatch.ts'; |
20 | | -import {initFindFileInRepo} from './features/repo-findfile.ts'; |
21 | | -import {initMarkupContent} from './markup/content.ts'; |
22 | | -import {initRepoFileView} from './features/file-view.ts'; |
23 | | -import {initUserAuthOauth2, initUserCheckAppUrl} from './features/user-auth.ts'; |
24 | | -import {initRepoPullRequestAllowMaintainerEdit, initRepoPullRequestReview, initRepoIssueSidebarDependency, initRepoIssueFilterItemLabel} from './features/repo-issue.ts'; |
25 | | -import {initRepoEllipsisButton, initCommitStatuses} from './features/repo-commit.ts'; |
26 | | -import {initRepoTopicBar} from './features/repo-home.ts'; |
27 | | -import {initAdminCommon} from './features/admin/common.ts'; |
28 | | -import {initRepoCodeView} from './features/repo-code.ts'; |
29 | | -import {initSshKeyFormParser} from './features/sshkey-helper.ts'; |
30 | | -import {initUserSettings} from './features/user-settings.ts'; |
31 | | -import {initRepoActivityTopAuthorsChart, initRepoArchiveLinks} from './features/repo-common.ts'; |
32 | | -import {initRepoMigrationStatusChecker} from './features/repo-migrate.ts'; |
33 | | -import {initRepoDiffView} from './features/repo-diff.ts'; |
34 | | -import {initOrgTeam} from './features/org-team.ts'; |
35 | | -import {initUserAuthWebAuthn, initUserAuthWebAuthnRegister} from './features/user-auth-webauthn.ts'; |
36 | | -import {initRepoRelease, initRepoReleaseNew} from './features/repo-release.ts'; |
37 | | -import {initRepoEditor} from './features/repo-editor.ts'; |
38 | | -import {initCompSearchUserBox} from './features/comp/SearchUserBox.ts'; |
39 | | -import {initInstall} from './features/install.ts'; |
40 | | -import {initCompWebHookEditor} from './features/comp/WebHookEditor.ts'; |
41 | | -import {initRepoBranchButton} from './features/repo-branch.ts'; |
42 | | -import {initCommonOrganization} from './features/common-organization.ts'; |
43 | | -import {initRepoWikiForm} from './features/repo-wiki.ts'; |
44 | | -import {initRepository, initBranchSelectorTabs} from './features/repo-legacy.ts'; |
45 | | -import {initCopyContent} from './features/copycontent.ts'; |
46 | | -import {initCaptcha} from './features/captcha.ts'; |
47 | | -import {initRepositoryActionView} from './features/repo-actions.ts'; |
48 | | -import {initGlobalTooltips} from './modules/tippy.ts'; |
49 | | -import {initGiteaFomantic} from './modules/fomantic.ts'; |
50 | | -import {initSubmitEventPolyfill, onDomReady} from './utils/dom.ts'; |
51 | | -import {initRepoIssueList} from './features/repo-issue-list.ts'; |
52 | | -import {initCommonIssueListQuickGoto} from './features/common-issue-list.ts'; |
53 | | -import {initRepoContributors} from './features/contributors.ts'; |
54 | | -import {initRepoCodeFrequency} from './features/code-frequency.ts'; |
55 | | -import {initRepoRecentCommits} from './features/recent-commits.ts'; |
56 | | -import {initRepoDiffCommitBranchesAndTags} from './features/repo-diff-commit.ts'; |
57 | | -import {initGlobalSelectorObserver} from './modules/observer.ts'; |
58 | | -import {initRepositorySearch} from './features/repo-search.ts'; |
59 | | -import {initColorPickers} from './features/colorpicker.ts'; |
60 | | -import {initAdminSelfCheck} from './features/admin/selfcheck.ts'; |
61 | | -import {initOAuth2SettingsDisableCheckbox} from './features/oauth2-settings.ts'; |
62 | | -import {initGlobalFetchAction} from './features/common-fetch-action.ts'; |
63 | | -import {initFootLanguageMenu, initGlobalAvatarUploader, initGlobalDropdown, initGlobalInput, initGlobalTabularMenu, initHeadNavbarContentToggle} from './features/common-page.ts'; |
64 | | -import {initGlobalButtonClickOnEnter, initGlobalButtons, initGlobalDeleteButton} from './features/common-button.ts'; |
65 | | -import {initGlobalComboMarkdownEditor, initGlobalEnterQuickSubmit, initGlobalFormDirtyLeaveConfirm} from './features/common-form.ts'; |
66 | | -import {callInitFunctions} from './modules/init.ts'; |
67 | | -import {initRepoViewFileTree} from './features/repo-view-file-tree.ts'; |
68 | | - |
69 | | -initGiteaFomantic(); |
70 | | -initSubmitEventPolyfill(); |
71 | | - |
72 | | -onDomReady(() => { |
73 | | - const initStartTime = performance.now(); |
74 | | - const initPerformanceTracer = callInitFunctions([ |
75 | | - initGlobalAvatarUploader, |
76 | | - initGlobalDropdown, |
77 | | - initGlobalTabularMenu, |
78 | | - initGlobalFetchAction, |
79 | | - initGlobalTooltips, |
80 | | - initGlobalButtonClickOnEnter, |
81 | | - initGlobalButtons, |
82 | | - initGlobalCopyToClipboardListener, |
83 | | - initGlobalEnterQuickSubmit, |
84 | | - initGlobalFormDirtyLeaveConfirm, |
85 | | - initGlobalComboMarkdownEditor, |
86 | | - initGlobalDeleteButton, |
87 | | - initGlobalInput, |
88 | | - |
89 | | - initCommonOrganization, |
90 | | - initCommonIssueListQuickGoto, |
91 | | - |
92 | | - initCompSearchUserBox, |
93 | | - initCompWebHookEditor, |
94 | | - |
95 | | - initInstall, |
96 | | - |
97 | | - initHeadNavbarContentToggle, |
98 | | - initFootLanguageMenu, |
99 | | - |
100 | | - initContextPopups, |
101 | | - initHeatmap, |
102 | | - initImageDiff, |
103 | | - initMarkupAnchors, |
104 | | - initMarkupContent, |
105 | | - initSshKeyFormParser, |
106 | | - initStopwatch, |
107 | | - initTableSort, |
108 | | - initFindFileInRepo, |
109 | | - initCopyContent, |
110 | | - |
111 | | - initAdminCommon, |
112 | | - initAdminUserListSearchForm, |
113 | | - initAdminConfigs, |
114 | | - initAdminSelfCheck, |
115 | | - |
116 | | - initDashboardRepoList, |
117 | | - |
118 | | - initNotificationCount, |
119 | | - initNotificationsTable, |
120 | | - |
121 | | - initOrgTeam, |
122 | | - |
123 | | - initRepoActivityTopAuthorsChart, |
124 | | - initRepoArchiveLinks, |
125 | | - initRepoBranchButton, |
126 | | - initRepoCodeView, |
127 | | - initBranchSelectorTabs, |
128 | | - initRepoEllipsisButton, |
129 | | - initRepoDiffCommitBranchesAndTags, |
130 | | - initRepoEditor, |
131 | | - initRepoGraphGit, |
132 | | - initRepoIssueContentHistory, |
133 | | - initRepoIssueList, |
134 | | - initRepoIssueFilterItemLabel, |
135 | | - initRepoIssueSidebarDependency, |
136 | | - initRepoMigration, |
137 | | - initRepoMigrationStatusChecker, |
138 | | - initRepoProject, |
139 | | - initRepoPullRequestAllowMaintainerEdit, |
140 | | - initRepoPullRequestReview, |
141 | | - initRepoRelease, |
142 | | - initRepoReleaseNew, |
143 | | - initRepoTopicBar, |
144 | | - initRepoViewFileTree, |
145 | | - initRepoWikiForm, |
146 | | - initRepository, |
147 | | - initRepositoryActionView, |
148 | | - initRepositorySearch, |
149 | | - initRepoContributors, |
150 | | - initRepoCodeFrequency, |
151 | | - initRepoRecentCommits, |
152 | | - |
153 | | - initCommitStatuses, |
154 | | - initCaptcha, |
155 | | - |
156 | | - initUserCheckAppUrl, |
157 | | - initUserAuthOauth2, |
158 | | - initUserAuthWebAuthn, |
159 | | - initUserAuthWebAuthnRegister, |
160 | | - initUserSettings, |
161 | | - initRepoDiffView, |
162 | | - initColorPickers, |
163 | | - |
164 | | - initOAuth2SettingsDisableCheckbox, |
165 | | - |
166 | | - initRepoFileView, |
167 | | - ]); |
168 | | - |
169 | | - // it must be the last one, then the "querySelectorAll" only needs to be executed once for global init functions. |
170 | | - initGlobalSelectorObserver(initPerformanceTracer); |
171 | | - if (initPerformanceTracer) initPerformanceTracer.printResults(); |
172 | | - |
173 | | - const initDur = performance.now() - initStartTime; |
174 | | - if (initDur > 500) { |
175 | | - console.error(`slow init functions took ${initDur.toFixed(3)}ms`); |
176 | | - } |
| 6 | +onDomReady(async () => { |
| 7 | + await import(/* webpackChunkName: "index-domready" */'./index-domready.ts'); |
177 | 8 | }); |
0 commit comments