From baef73b02b733ff2573a6b0e5ace9a9fe425cb9e Mon Sep 17 00:00:00 2001 From: 45kb Date: Sun, 11 Dec 2016 20:22:55 +0100 Subject: [PATCH] toggle install prompts clicking on active icon --- lib/js/interface/top.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/js/interface/top.js b/lib/js/interface/top.js index dd39731e..173b0657 100644 --- a/lib/js/interface/top.js +++ b/lib/js/interface/top.js @@ -308,11 +308,17 @@ angular.module(moduleName, []) }; this.activeClickedLink = activeLink => { + if ((activeLink === '1' || activeLink === '4') && + this.activeLink === activeLink) { + //toggle prompts show/hide + this.activeLink = false; + } else { - this.activeLink = activeLink; - $rootScope.$emit('top-bar:active-link', { - 'link': activeLink - }); + this.activeLink = activeLink; + $rootScope.$emit('top-bar:active-link', { + 'link': activeLink + }); + } }; //show if new npm version is available in view