summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/layout_nav.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-28 18:09:40 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-28 18:09:40 +0000
commitdce57587960022ca3582bedfc5bcf356893fe603 (patch)
tree0e671ae3f22ccb61a3a3c5a15b53f899576e7542 /app/assets/javascripts/layout_nav.js
parent34b3acb5a3a9b21490e45b81b81dca600b66521c (diff)
downloadgitlab-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.js9
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 }) => {