mirror of
https://github.com/quay/quay.git
synced 2026-01-26 06:21:37 +03:00
Only show ui toggle if on signin page (#1515)
Signed-off-by: Dave O'Connor <1656866+HammerMeetNail@users.noreply.github.com> Signed-off-by: Dave O'Connor <doconnor@redhat.com>
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
|
||||
<!-- Normal -->
|
||||
<ul class="nav navbar-nav navbar-right hidden-xs" ng-switch on="user.anonymous">
|
||||
<li class="new-ui-toggle" ng-if="Features.UI_V2">
|
||||
<li class="new-ui-toggle" ng-if="Features.UI_V2 && !checkElementByID('signin-username')">
|
||||
<new-ui-toggle></new-ui-toggle>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -145,6 +145,14 @@ angular.module('quay').directive('headerBar', function () {
|
||||
'namespace': namespace
|
||||
};
|
||||
};
|
||||
|
||||
$scope.checkElementByID = function(elementID) {
|
||||
var result = false;
|
||||
if (document.getElementById(elementID)) {
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
|
||||
Reference in New Issue
Block a user