Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-29 00:08:53 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-29 00:08:53 +0300
commit112fe349cb75b79a0075f5d3f89cf847b7beaf2d (patch)
tree9b1e1e9c61ab05e6725f7f961d02ddb57bf2d616 /app/assets/javascripts/nav
parenta66948df0c3fda7764965f8cf4c9c99226c0d44d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/nav')
-rw-r--r--app/assets/javascripts/nav/components/responsive_app.vue14
-rw-r--r--app/assets/javascripts/nav/event_hub.js5
-rw-r--r--app/assets/javascripts/nav/utils/has_menu_expanded.js2
-rw-r--r--app/assets/javascripts/nav/utils/index.js1
4 files changed, 1 insertions, 21 deletions
diff --git a/app/assets/javascripts/nav/components/responsive_app.vue b/app/assets/javascripts/nav/components/responsive_app.vue
index d601586a3f8..68a39f862fc 100644
--- a/app/assets/javascripts/nav/components/responsive_app.vue
+++ b/app/assets/javascripts/nav/components/responsive_app.vue
@@ -2,8 +2,7 @@
import { FREQUENT_ITEMS_PROJECTS, FREQUENT_ITEMS_GROUPS } from '~/frequent_items/constants';
import { BV_DROPDOWN_SHOW, BV_DROPDOWN_HIDE } from '~/lib/utils/constants';
import KeepAliveSlots from '~/vue_shared/components/keep_alive_slots.vue';
-import eventHub, { EVENT_RESPONSIVE_TOGGLE } from '../event_hub';
-import { resetMenuItemsActive, hasMenuExpanded } from '../utils';
+import { resetMenuItemsActive } from '../utils';
import ResponsiveHeader from './responsive_header.vue';
import ResponsiveHome from './responsive_home.vue';
import TopNavContainerView from './top_nav_container_view.vue';
@@ -33,25 +32,14 @@ export default {
},
},
created() {
- eventHub.$on(EVENT_RESPONSIVE_TOGGLE, this.updateResponsiveOpen);
this.$root.$on(BV_DROPDOWN_SHOW, this.showMobileOverlay);
this.$root.$on(BV_DROPDOWN_HIDE, this.hideMobileOverlay);
-
- this.updateResponsiveOpen();
},
beforeDestroy() {
- eventHub.$off(EVENT_RESPONSIVE_TOGGLE, this.onToggle);
this.$root.$off(BV_DROPDOWN_SHOW, this.showMobileOverlay);
this.$root.$off(BV_DROPDOWN_HIDE, this.hideMobileOverlay);
},
methods: {
- updateResponsiveOpen() {
- if (hasMenuExpanded()) {
- document.body.classList.add('top-nav-responsive-open');
- } else {
- document.body.classList.remove('top-nav-responsive-open');
- }
- },
onMenuItemClick({ view }) {
if (view) {
this.activeView = view;
diff --git a/app/assets/javascripts/nav/event_hub.js b/app/assets/javascripts/nav/event_hub.js
deleted file mode 100644
index 2c8b1371fe3..00000000000
--- a/app/assets/javascripts/nav/event_hub.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import eventHubFactory from '~/helpers/event_hub_factory';
-
-export const EVENT_RESPONSIVE_TOGGLE = 'top-nav-responsive-toggle';
-
-export default eventHubFactory();
diff --git a/app/assets/javascripts/nav/utils/has_menu_expanded.js b/app/assets/javascripts/nav/utils/has_menu_expanded.js
deleted file mode 100644
index 5f126bbdf76..00000000000
--- a/app/assets/javascripts/nav/utils/has_menu_expanded.js
+++ /dev/null
@@ -1,2 +0,0 @@
-export const hasMenuExpanded = () =>
- Boolean(document.querySelector('.header-content.menu-expanded'));
diff --git a/app/assets/javascripts/nav/utils/index.js b/app/assets/javascripts/nav/utils/index.js
index 4fa3d0910da..6d93818f0d3 100644
--- a/app/assets/javascripts/nav/utils/index.js
+++ b/app/assets/javascripts/nav/utils/index.js
@@ -1,2 +1 @@
-export * from './has_menu_expanded';
export * from './reset_menu_items_active';