diff options
Diffstat (limited to 'app/assets/javascripts/commons')
-rw-r--r-- | app/assets/javascripts/commons/bootstrap.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/commons/nav/user_merge_requests.js | 12 | ||||
-rw-r--r-- | app/assets/javascripts/commons/vue.js | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/app/assets/javascripts/commons/bootstrap.js b/app/assets/javascripts/commons/bootstrap.js index e5e23f2fb5e..17c9f55a8a0 100644 --- a/app/assets/javascripts/commons/bootstrap.js +++ b/app/assets/javascripts/commons/bootstrap.js @@ -1,10 +1,6 @@ import $ from 'jquery'; // bootstrap jQuery plugins -import 'bootstrap/js/dist/alert'; -import 'bootstrap/js/dist/button'; -import 'bootstrap/js/dist/collapse'; -import 'bootstrap/js/dist/modal'; import 'bootstrap/js/dist/dropdown'; import 'bootstrap/js/dist/tab'; diff --git a/app/assets/javascripts/commons/nav/user_merge_requests.js b/app/assets/javascripts/commons/nav/user_merge_requests.js index b105273ece7..90dca0310f3 100644 --- a/app/assets/javascripts/commons/nav/user_merge_requests.js +++ b/app/assets/javascripts/commons/nav/user_merge_requests.js @@ -30,6 +30,12 @@ function updateMergeRequestCounts(newCount) { * Refresh user counts (and broadcast if open) */ export function refreshUserMergeRequestCounts() { + if (gon?.use_new_navigation) { + // The new sidebar manages _all_ the counts in + // ~/super_sidebar/user_counts_manager.js + document.dispatchEvent(new CustomEvent('userCounts:fetch')); + return Promise.resolve(); + } return getUserCounts() .then(({ data }) => { const assignedMergeRequests = data.assigned_merge_requests; @@ -67,6 +73,12 @@ export function closeUserCountsBroadcast() { * no special functionality lost except cross tab notifications */ export function openUserCountsBroadcast() { + if (gon?.use_new_navigation) { + // The new sidebar broadcasts _all counts_ and updates + // them accordingly. Therefore we do not need this manager + // ~/super_sidebar/user_counts_manager.js + return; + } closeUserCountsBroadcast(); if (window.BroadcastChannel) { diff --git a/app/assets/javascripts/commons/vue.js b/app/assets/javascripts/commons/vue.js index cd24a503631..09d2e065e58 100644 --- a/app/assets/javascripts/commons/vue.js +++ b/app/assets/javascripts/commons/vue.js @@ -9,4 +9,4 @@ if (process.env.NODE_ENV !== 'production') { Vue.use(GlFeatureFlagsPlugin); Vue.use(Translate); -Vue.config.ignoredElements = ['gl-emoji']; +Vue.config.ignoredElements = ['gl-emoji', 'copy-code']; |