diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-28 18:09:40 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-28 18:09:40 +0000 |
commit | dce57587960022ca3582bedfc5bcf356893fe603 (patch) | |
tree | 0e671ae3f22ccb61a3a3c5a15b53f899576e7542 /app/assets/javascripts/layout_nav.js | |
parent | 34b3acb5a3a9b21490e45b81b81dca600b66521c (diff) | |
download | gitlab-ce-dce57587960022ca3582bedfc5bcf356893fe603.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/layout_nav.js')
-rw-r--r-- | app/assets/javascripts/layout_nav.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/assets/javascripts/layout_nav.js b/app/assets/javascripts/layout_nav.js index d7f5e6f8a5e..4d2955a8d3d 100644 --- a/app/assets/javascripts/layout_nav.js +++ b/app/assets/javascripts/layout_nav.js @@ -16,6 +16,15 @@ function initDeferred() { const whatsNewTriggerEl = document.querySelector('.js-whats-new-trigger'); if (whatsNewTriggerEl) { + const storageKey = whatsNewTriggerEl.getAttribute('data-storage-key'); + + $('.header-help').on('show.bs.dropdown', () => { + const displayNotification = JSON.parse(localStorage.getItem(storageKey)); + if (displayNotification === false) { + $('.js-whats-new-notification-count').remove(); + } + }); + whatsNewTriggerEl.addEventListener('click', () => { import(/* webpackChunkName: 'whatsNewApp' */ '~/whats_new') .then(({ default: initWhatsNew }) => { |