diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-23 18:08:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-23 18:08:38 +0300 |
commit | 16dbaf57bc4d87aa8a2bca8bf9db7cab26d841c4 (patch) | |
tree | f5c6a87c9fbc0677c965d07b85a305cb2cb0fcc7 /app/assets/javascripts/pages | |
parent | 3e68d3848770b492d314f8e2967c37f7fdd5d143 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pages')
-rw-r--r-- | app/assets/javascripts/pages/projects/merge_requests/init_merge_request_show.js | 12 | ||||
-rw-r--r-- | app/assets/javascripts/pages/projects/snippets/show/index.js | 9 |
2 files changed, 4 insertions, 17 deletions
diff --git a/app/assets/javascripts/pages/projects/merge_requests/init_merge_request_show.js b/app/assets/javascripts/pages/projects/merge_requests/init_merge_request_show.js index c548ea9bb80..0e0c1475eda 100644 --- a/app/assets/javascripts/pages/projects/merge_requests/init_merge_request_show.js +++ b/app/assets/javascripts/pages/projects/merge_requests/init_merge_request_show.js @@ -1,6 +1,5 @@ import Vue from 'vue'; import VueApollo from 'vue-apollo'; -import loadAwardsHandler from '~/awards_handler'; import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable'; import { initPipelineCountListener } from '~/commit/pipelines/utils'; import { initIssuableSidebar } from '~/issuable'; @@ -8,23 +7,16 @@ import StatusBox from '~/issuable/components/status_box.vue'; import createDefaultClient from '~/lib/graphql'; import initSourcegraph from '~/sourcegraph'; import ZenMode from '~/zen_mode'; +import initAwardsApp from '~/emoji/awards_app'; import getStateQuery from './queries/get_state.query.graphql'; export default function initMergeRequestShow() { - const awardEmojiEl = document.getElementById('js-vue-awards-block'); - new ZenMode(); // eslint-disable-line no-new initPipelineCountListener(document.querySelector('#commit-pipeline-table-view')); new ShortcutsIssuable(true); // eslint-disable-line no-new initSourcegraph(); initIssuableSidebar(); - if (awardEmojiEl) { - import('~/emoji/awards_app') - .then((m) => m.default(awardEmojiEl)) - .catch(() => {}); - } else { - loadAwardsHandler(); - } + initAwardsApp(document.getElementById('js-vue-awards-block')); const el = document.querySelector('.js-mr-status-box'); const apolloProvider = new VueApollo({ diff --git a/app/assets/javascripts/pages/projects/snippets/show/index.js b/app/assets/javascripts/pages/projects/snippets/show/index.js index c719601ee0b..77baa6d77a5 100644 --- a/app/assets/javascripts/pages/projects/snippets/show/index.js +++ b/app/assets/javascripts/pages/projects/snippets/show/index.js @@ -1,9 +1,4 @@ import '~/snippet/snippet_show'; +import initAwardsApp from '~/emoji/awards_app'; -const awardEmojiEl = document.getElementById('js-vue-awards-block'); - -if (awardEmojiEl) { - import('~/emoji/awards_app') - .then((m) => m.default(awardEmojiEl)) - .catch(() => {}); -} +initAwardsApp(document.getElementById('js-vue-awards-block')); |