diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-08 21:14:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-08 21:14:31 +0300 |
commit | bb0d99269b1bee11939e6a3ddfcefed8c6fd4874 (patch) | |
tree | 58f5d3f64251e1847a1bfb77d76ead2abb16c899 /app/assets/javascripts/super_sidebar | |
parent | f1ce233e6ab6535afef76f10528e104672426710 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/super_sidebar')
-rw-r--r-- | app/assets/javascripts/super_sidebar/components/super_sidebar.vue | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/super_sidebar/components/super_sidebar.vue b/app/assets/javascripts/super_sidebar/components/super_sidebar.vue index 3beec4ccc14..f2970f05ebc 100644 --- a/app/assets/javascripts/super_sidebar/components/super_sidebar.vue +++ b/app/assets/javascripts/super_sidebar/components/super_sidebar.vue @@ -7,6 +7,7 @@ import { TAB_KEY_CODE } from '~/lib/utils/keycodes'; import { keysFor, TOGGLE_SUPER_SIDEBAR } from '~/behaviors/shortcuts/keybindings'; import { __, s__ } from '~/locale'; import Tracking from '~/tracking'; +import eventHub from '../event_hub'; import { sidebarState, SUPER_SIDEBAR_PEEK_STATE_CLOSED as STATE_CLOSED, @@ -58,6 +59,7 @@ export default { showPeekHint: false, isMouseover: false, breakpoint: null, + showSuperSidebarContextHeader: true, }; }, computed: { @@ -96,6 +98,7 @@ export default { mounted() { this.setupFocusTrapListener(); Mousetrap.bind(keysFor(TOGGLE_SUPER_SIDEBAR), this.toggleSidebar); + eventHub.$on('toggle-menu-header', this.onToggleMenuHeader); }, beforeDestroy() { document.removeEventListener('keydown', this.focusTrap); @@ -166,6 +169,9 @@ export default { event.preventDefault(); } }, + onToggleMenuHeader(forceState) { + this.showSuperSidebarContextHeader = forceState; + }, }, }; </script> @@ -207,6 +213,7 @@ export default { > <scroll-scrim class="gl-flex-grow-1" data-testid="nav-container"> <div + v-if="showSuperSidebarContextHeader" id="super-sidebar-context-header" class="gl-px-5 gl-pt-3 gl-pb-2 gl-m-0 gl-reset-line-height gl-font-weight-bold gl-font-sm super-sidebar-context-header" > |