forked from gitlabhq/gitlabhq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add latest changes from gitlab-org/gitlab@master
- Loading branch information
GitLab Bot
committed
Oct 8, 2020
1 parent
33882b0
commit 2f5c5b1
Showing
126 changed files
with
1,476 additions
and
956 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,13 @@ | ||
if (!gon.features.snippetsVue) { | ||
const LineHighlighterModule = import('~/line_highlighter'); | ||
const BlobViewerModule = import('~/blob/viewer'); | ||
const ZenModeModule = import('~/zen_mode'); | ||
const SnippetEmbedModule = import('~/snippet/snippet_embed'); | ||
const initNotesModule = import('~/init_notes'); | ||
const loadAwardsHandlerModule = import('~/awards_handler'); | ||
import initNotes from '~/init_notes'; | ||
import loadAwardsHandler from '~/awards_handler'; | ||
import { SnippetShowInit } from '~/snippets'; | ||
import ZenMode from '~/zen_mode'; | ||
|
||
Promise.all([ | ||
LineHighlighterModule, | ||
BlobViewerModule, | ||
ZenModeModule, | ||
SnippetEmbedModule, | ||
initNotesModule, | ||
loadAwardsHandlerModule, | ||
]) | ||
.then( | ||
([ | ||
{ default: LineHighlighter }, | ||
{ default: BlobViewer }, | ||
{ default: ZenMode }, | ||
{ default: SnippetEmbed }, | ||
{ default: initNotes }, | ||
{ default: loadAwardsHandler }, | ||
]) => { | ||
new LineHighlighter(); // eslint-disable-line no-new | ||
new BlobViewer(); // eslint-disable-line no-new | ||
new ZenMode(); // eslint-disable-line no-new | ||
SnippetEmbed(); | ||
initNotes(); | ||
loadAwardsHandler(); | ||
}, | ||
) | ||
.catch(() => {}); | ||
} else { | ||
import('~/snippets') | ||
.then(({ SnippetShowInit }) => { | ||
SnippetShowInit(); | ||
}) | ||
.then(() => { | ||
return Promise.all([import('~/init_notes'), import('~/awards_handler')]); | ||
}) | ||
.then(([{ default: initNotes }, { default: loadAwardsHandler }]) => { | ||
initNotes(); | ||
loadAwardsHandler(); | ||
}) | ||
.catch(() => {}); | ||
} | ||
document.addEventListener('DOMContentLoaded', () => { | ||
SnippetShowInit(); | ||
initNotes(); | ||
loadAwardsHandler(); | ||
|
||
// eslint-disable-next-line no-new | ||
new ZenMode(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.