Commit af0c6917 authored by Rémy Coutable's avatar Rémy Coutable

Improve the JS for the `p b` shortcut and fix its CSS

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 54c04f53
...@@ -58,10 +58,11 @@ import findAndFollowLink from './shortcuts_dashboard_navigation'; ...@@ -58,10 +58,11 @@ import findAndFollowLink from './shortcuts_dashboard_navigation';
Shortcuts.prototype.onTogglePerfBar = function(e) { Shortcuts.prototype.onTogglePerfBar = function(e) {
e.preventDefault(); e.preventDefault();
if (Cookies.get('perf_bar_enabled') === 'true') { const performanceBarCookieName = 'perf_bar_enabled';
Cookies.remove('perf_bar_enabled', { path: '/' }); if (Cookies.get(performanceBarCookieName) === 'true') {
Cookies.remove(performanceBarCookieName, { path: '/' });
} else { } else {
Cookies.set('perf_bar_enabled', true, { path: '/' }); Cookies.set(performanceBarCookieName, true, { path: '/' });
} }
gl.utils.refreshCurrentPage(); gl.utils.refreshCurrentPage();
}; };
......
...@@ -6,12 +6,7 @@ header.navbar-gitlab.with-peek { ...@@ -6,12 +6,7 @@ header.navbar-gitlab.with-peek {
} }
#peek { #peek {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 35px; height: 35px;
z-index: 400;
background: #000; background: #000;
line-height: 35px; line-height: 35px;
color: #999; color: #999;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment