1
0
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:
Dave O'Connor
2022-09-06 15:40:34 -04:00
committed by GitHub
parent 292d33f292
commit d5e7028dcd
2 changed files with 9 additions and 1 deletions

View File

@@ -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>

View File

@@ -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;