diff options
author | Phil Hughes <me@iamphill.com> | 2018-01-23 09:11:41 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-01-24 08:45:06 +0000 |
commit | adf31a57f47215813e36c573c98bb11ab608cee9 (patch) | |
tree | 5a54cf367a8d9485952780622adb752e54ce3049 | |
parent | 74da79113bb2eb7363403d7c2a9f1e0624590b74 (diff) | |
download | gitlab-ce-adf31a57f47215813e36c573c98bb11ab608cee9.tar.gz |
Added imports for dispatcher routes
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 20 | ||||
-rw-r--r-- | app/assets/javascripts/pages/projects/show/index.js | 4 |
2 files changed, 7 insertions, 17 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index d5659be28a4..f9e23189774 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -1,13 +1,8 @@ /* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, wrap-iife, no-shadow, consistent-return, one-var, one-var-declaration-per-line, camelcase, default-case, no-new, quotes, no-duplicate-case, no-case-declarations, no-fallthrough, max-len */ -import notificationsDropdown from './notifications_dropdown'; -import LineHighlighter from './line_highlighter'; import MergeRequest from './merge_request'; import Flash from './flash'; -import BlobViewer from './blob/viewer/index'; import GfmAutoComplete from './gfm_auto_complete'; -import Star from './star'; import ZenMode from './zen_mode'; -import PerformanceBar from './performance_bar'; import initNotes from './init_notes'; import initIssuableSidebar from './init_issuable_sidebar'; import { convertPermissionToBoolean } from './lib/utils/common_utils'; @@ -621,23 +616,12 @@ import SearchAutocomplete from './search_autocomplete'; .then(callDefault) .catch(fail); break; - case 'show': - new Star(); - notificationsDropdown(); - break; case 'wikis': import('./pages/projects/wikis') .then(callDefault) .catch(fail); shortcut_handler = true; break; - case 'snippets': - if (path[2] === 'show') { - new ZenMode(); - new LineHighlighter(); - new BlobViewer(); - } - break; } break; } @@ -647,7 +631,9 @@ import SearchAutocomplete from './search_autocomplete'; } if (document.querySelector('#peek')) { - new PerformanceBar({ container: '#peek' }); + import('./performance_bar') + .then(m => new m.default({ container: '#peek' })) // eslint-disable-line new-cap + .catch(fail); } }; diff --git a/app/assets/javascripts/pages/projects/show/index.js b/app/assets/javascripts/pages/projects/show/index.js index 92dc1e59651..55154cdddcb 100644 --- a/app/assets/javascripts/pages/projects/show/index.js +++ b/app/assets/javascripts/pages/projects/show/index.js @@ -5,8 +5,12 @@ import TreeView from '~/tree'; import BlobViewer from '~/blob/viewer/index'; import Activities from '~/activities'; import { ajaxGet } from '~/lib/utils/common_utils'; +import Star from '../../../star'; +import notificationsDropdown from '../../../notifications_dropdown'; export default () => { + new Star(); // eslint-disable-line no-new + notificationsDropdown(); new ShortcutsNavigation(); // eslint-disable-line no-new new NotificationsForm(); // eslint-disable-line no-new new UserCallout({ // eslint-disable-line no-new |