1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Hide user profile menu

This commit is contained in:
Nick O'Leary 2014-12-10 14:58:53 +00:00
parent a494954275
commit b2aae93fa6
9 changed files with 19 additions and 14 deletions

View File

@ -31,12 +31,12 @@
<body spellcheck="false"> <body spellcheck="false">
<div id="header"> <div id="header">
<span class="logo"><img src="node-red.png"> <span>Node-RED</span></span> <span class="logo"><img src="node-red.png"> <span>Node-RED</span></span>
<ul class="header-toolbar"> <ul class="header-toolbar hide">
<li><span class="deploy-button-group button-group"> <li><span class="deploy-button-group button-group">
<a id="btn-deploy" class="action-deploy disabled" href="#"><img id="btn-icn-deploy" src="images/deploy-full-o.png"> <span>Deploy</span></a> <a id="btn-deploy" class="action-deploy disabled" href="#"><img id="btn-icn-deploy" src="images/deploy-full-o.png"> <span>Deploy</span></a>
<a id="btn-deploy-options" data-toggle="dropdown" class="" href="#"><i class="fa fa-caret-down"></i></a> <a id="btn-deploy-options" data-toggle="dropdown" class="" href="#"><i class="fa fa-caret-down"></i></a>
</span></li> </span></li>
<li><a id="btn-usermenu" class="button" data-toggle="dropdown" href="#"><i class="fa fa-user"></i></a></li> <li><a id="btn-usermenu" class="button hide" data-toggle="dropdown" href="#"><i class="fa fa-user"></i></a></li>
<li><a id="btn-sidemenu" class="button" data-toggle="dropdown" href="#"><i class="fa fa-bars"></i></a></li> <li><a id="btn-sidemenu" class="button" data-toggle="dropdown" href="#"><i class="fa fa-bars"></i></a></li>
<ul> <ul>
</div> </div>

View File

@ -315,7 +315,7 @@ var RED = (function() {
options: [] options: []
}); });
function updateUserMenu() { var updateUserMenu = function() {
$("#btn-usermenu-submenu li").remove(); $("#btn-usermenu-submenu li").remove();
if (RED.settings.user.anonymous) { if (RED.settings.user.anonymous) {
RED.menu.addItem("btn-usermenu",{ RED.menu.addItem("btn-usermenu",{
@ -347,6 +347,8 @@ var RED = (function() {
} }
updateUserMenu(); updateUserMenu();
} else {
$("#btn-usermenu").parent().hide();
} }
$("#main-container").show(); $("#main-container").show();

View File

@ -85,12 +85,15 @@ span.logo img {
} }
#header ul.header-toolbar > li { #header ul.header-toolbar > li {
display: inline-block;
padding: 0; padding: 0;
margin: 0; margin: 0;
position: relative; position: relative;
} }
#header ul.header-toolbar > li {
display: inline-block;
}
.button { .button {
-webkit-user-select: none; -webkit-user-select: none;
-khtml-user-select: none; -khtml-user-select: none;
@ -181,7 +184,7 @@ span.deploy-button-group.open > #btn-deploy.disabled + a {
.button-group { .button-group {
display: inline-block; display: inline-block;
margin: auto 10px; margin: auto 15px;
vertical-align: middle; vertical-align: middle;
background: #555; background: #555;
clear: both; clear: both;
@ -199,16 +202,16 @@ span.deploy-button-group.open > #btn-deploy.disabled + a {
.button-group > a:last-child { .button-group > a:last-child {
} }
#btn-sidemenu { #header .button {
font-size: 20px !important; font-size: 20px !important;
} }
#btn-sidemenu:active, #btn-sidemenu.active { #header .button:active, #header .button.active {
background: #121212; background: #121212;
} }
#header .button:focus { #header .button:focus {
outline: none; outline: none;
} }
li.open #btn-sidemenu { #header li.open .button {
background: #121212; background: #121212;
border-color: #121212; border-color: #121212;
} }

View File

@ -1,5 +1,5 @@
/** /**
* Copyright 2014 IBM Corp. * Copyright 2015 IBM Corp.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
/** /**
* Copyright 2014 IBM Corp. * Copyright 2015 IBM Corp.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
/** /**
* Copyright 2014 IBM Corp. * Copyright 2015 IBM Corp.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
/** /**
* Copyright 2014 IBM Corp. * Copyright 2015 IBM Corp.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
/** /**
* Copyright 2014 IBM Corp. * Copyright 2015 IBM Corp.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
/** /**
* Copyright 2014 IBM Corp. * Copyright 2015 IBM Corp.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.