Skip to content
This repository has been archived by the owner on Oct 20, 2021. It is now read-only.

Commit

Permalink
feat(navbar): hide login button on login form
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGeraud authored and brasseld committed Nov 20, 2018
1 parent c355ec9 commit 501f182
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/portal/components/navbar/navbar.component.ts
Expand Up @@ -38,6 +38,7 @@ export const NavbarComponent: ng.IComponentOptions = {
'ngInject';

const vm = this;
vm.$state = $state;
vm.tasksScheduler = null;
vm.$rootScope = $rootScope;
vm.displayContextualDocumentationButton = false;
Expand Down Expand Up @@ -94,6 +95,7 @@ export const NavbarComponent: ng.IComponentOptions = {
vm.$onInit = function () {
vm.supportEnabled = Constants.portal.support.enabled;
$scope.$emit('graviteeUserRefresh', {user: undefined, refresh: true});

};

vm.isUserManagement = function () {
Expand Down
3 changes: 1 addition & 2 deletions src/portal/components/navbar/navbar.html
Expand Up @@ -25,13 +25,12 @@
<md-button ng-if="$ctrl.supportEnabled" class="gv-navbar-link" ui-sref-active="menu-active" ui-sref="support">{{'menu.support' | translate}}</md-button>
</div>
<span flex></span>
<span>{{$ctrl.$state.current.name}}</span>
<md-button class="gv-navbar-button" ng-click="$ctrl.openContextualDocumentation();" aria-label="Display contextual documentation"
ng-if="$ctrl.displayContextualDocumentationButton">
<ng-md-icon icon="live_help" gv-theme-element="portal.navbar.help"></ng-md-icon>
</md-button>
<portal-notifications user="$ctrl.graviteeUser" ng-if="$ctrl.graviteeUser.username"></portal-notifications>
<md-button ng-if="!$ctrl.graviteeUser.username && !$ctrl.isOnlyOAuth" ui-sref-active="menu-active" ui-sref="login">{{'menu.login' | translate}}</md-button>
<md-button ng-if="!$ctrl.graviteeUser.username && !$ctrl.isOnlyOAuth" ui-sref-active="menu-active" ui-sref="login" ng-show="'login' !== $ctrl.$state.current.name">{{'menu.login' | translate}}</md-button>
<md-button ng-if="!$ctrl.graviteeUser.username && $ctrl.isOnlyOAuth" ui-sref-active="menu-active" style="background-color: {{provider.color}}; color: #fff;" data-ng-repeat="provider in $ctrl.providers" ng-click="$ctrl.authenticate(provider.id)">
<ng-md-icon icon="{{provider.icon}}" size="20" style="fill: white;margin-right: 5px"></ng-md-icon>{{'menu.login' | translate}}
</md-button>
Expand Down

0 comments on commit 501f182

Please sign in to comment.