Merge branch 'ref/design' of github.com:bitpay/bitpay-wallet into scanHandling

This commit is contained in:
Marty Alcala 2016-10-19 16:36:32 -04:00
commit 01d5e1d2eb
36 changed files with 332 additions and 145 deletions

View file

@ -113,10 +113,13 @@ angular.module('copayApp.directives')
}
}
})
.directive('contact', ['addressbookService', 'lodash',
function(addressbookService, lodash) {
.directive('contact', ['addressbookService', 'lodash', 'gettextCatalog',
function(addressbookService, lodash, gettextCatalog) {
return {
restrict: 'E',
scope: {
label: '='
},
link: function(scope, element, attrs) {
var addr = attrs.address;
addressbookService.get(addr, function(err, ab) {
@ -124,7 +127,11 @@ angular.module('copayApp.directives')
var name = lodash.isObject(ab) ? ab.name : ab;
element.append(name);
} else {
element.append(addr);
if (scope.label && scope.label == 'Sent') {
element.append(gettextCatalog.getString('Sent'));
} else {
element.append(addr);
}
}
});
}

View file

@ -12,9 +12,10 @@ angular.module('copayApp.directives')
email: '@'
},
link: function(scope, el, attr) {
scope.emailHash = md5.createHash(scope.email || '');
if(typeof scope.email === "string"){
scope.emailHash = md5.createHash(scope.email.toLowerCase() || '');
}
},
template: '<img class="gravatar" alt="{{ name }}" height="{{ height }}" width="{{ width }}" src="https://secure.gravatar.com/avatar/{{ emailHash }}.jpg?s={{ width }}&d=mm">'
}
});