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

Commit

Permalink
feat: use default avatar when image not load
Browse files Browse the repository at this point in the history
  • Loading branch information
gcusnieux committed Nov 18, 2019
1 parent 0a8190f commit edd39c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/portal/components/navbar/navbar.html
Expand Up @@ -38,10 +38,11 @@

<md-menu ng-if="$ctrl.graviteeUser.id" md-offset="0 54">
<md-button class="gv-navbar-user-link" ng-click="$mdMenu.open($event)" aria-label="Open user menu">
<img ng-if="!$ctrl.hasAlert()" ng-src="{{$ctrl.getUserPicture()}}"
<img ng-if="!$ctrl.hasAlert()" ng-src="{{$ctrl.getUserPicture()}}" onerror="this.src='assets/default_photo.png'"
alt="user-picture" gv-theme-element="portal.navbar.user.img"/>
<img ng-if="$ctrl.hasAlert()" ng-src="{{$ctrl.getUserPicture()}}"
<img ng-if="$ctrl.hasAlert()" ng-src="{{$ctrl.getUserPicture()}}" onerror="this.src='assets/default_photo.png'"
alt="user-picture" gv-theme-element="portal.navbar.user.img.alert"/>

<span ng-if="$ctrl.hasAlert()" flex class="gv-menu-badge-alert" gv-theme-element="portal.navbar.user.notification"></span>
</md-button>
<md-menu-content class="gv-menu-content" ng-mouseleave="$mdMenu.close()">
Expand Down

0 comments on commit edd39c7

Please sign in to comment.