Browse Source

Merge pull request #34 from ExtProjNomit/avatar-fixed

Applied avatar lib
pull/146/head
Mohammed Tantawy 7 years ago
committed by GitHub
parent
commit
5f37b20133
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions
  1. +2
    -2
      src/assets/scripts/nwTopbar/nwTopbar.html
  2. +3
    -2
      src/assets/scripts/nwTopbar/topbar.controller.js

+ 2
- 2
src/assets/scripts/nwTopbar/nwTopbar.html View File

@ -43,10 +43,10 @@
<span class="fsz-sm c-grey-900 visible-'{{user.role}}'" ng-show="'{{user.role}}'==='company' || '{{user.role}}'==='user'">{{user.fullname}}</span>
</div>
<div class="peer mR-10 visible-nomit" ng-show="'{{user.role}}'==='nomit'">
<img class=" w-2r bdrs-50p mL-10 nomit-logo-top" src="assets/static/images/nomit-logo.png" alt="">
<img class="w-2r bdrs-50p mL-10 nomit-logo-top" src="assets/static/images/nomit-logo.png" alt="">
</div>
<div id="avatar" class="peer mR-10 visible-referee visible-user visible-company" ng-show="'{{user.role}}'!='nomit'">
<img ng-src="{{avatar.element.src}}" class="w-3r bdrs-50p mL-10"/>
</div>
</a>


+ 3
- 2
src/assets/scripts/nwTopbar/topbar.controller.js View File

@ -8,9 +8,10 @@ const TopbarController = ($scope, UserService) => {
$scope.user = user;
});
const avatar = new Avatar(document.getElementById('avatar'), {
$scope.avatar = new Avatar(document.getElementById('avatar'), {
'useGravatar': false,
'initials': 'CC',
'initials': 'AD', // it will be`${$scope.user.first_name[0]}${$scope.user.last_name[1]}`
'initial_weight': 300,
});
$scope.$on('needReload', function(event){


Loading…
Cancel
Save