diff --git a/Gruntfile.js b/Gruntfile.js index 05df4524b..5b610e424 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -120,6 +120,7 @@ module.exports = function(grunt) { 'bower_components/ng-csv/build/ng-csv.js', 'bower_components/ionic-toast/dist/ionic-toast.bundle.min.js', 'bower_components/angular-clipboard/angular-clipboard.js', + 'bower_components/angular-md5/angular-md5.js', 'bower_components/angular-mocks/angular-mocks.js', 'angular-pbkdf2/angular-pbkdf2.js', 'angular-bitcore-wallet-client/angular-bitcore-wallet-client.js' diff --git a/bower.json b/bower.json index e7daba801..ed6b9bd64 100644 --- a/bower.json +++ b/bower.json @@ -18,7 +18,8 @@ "trezor-connect": "~1.0.1", "ng-csv": "~0.3.6", "ionic-toast": "^0.4.1", - "angular-clipboard": "^1.4.2" + "angular-clipboard": "^1.4.2", + "angular-md5": "^0.1.10" }, "resolutions": { "angular": "1.5.3" diff --git a/public/views/addressbook.html b/public/views/addressbook.html index 3262e0c19..fdd60accb 100644 --- a/public/views/addressbook.html +++ b/public/views/addressbook.html @@ -29,10 +29,11 @@ - - {{addrEntry.name}} + +

{{addrEntry.name}}

+

{{addrEntry.address}}

diff --git a/public/views/addressbook.view.html b/public/views/addressbook.view.html index 00b191e7f..16549a4ec 100644 --- a/public/views/addressbook.view.html +++ b/public/views/addressbook.view.html @@ -12,6 +12,10 @@ +
+ +
+

Name

diff --git a/src/js/app.js b/src/js/app.js index d4cd8448c..001bf9826 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -9,6 +9,7 @@ var modules = [ 'angular-clipboard', 'ngLodash', 'ngCsv', + 'angular-md5', 'bwcModule', 'pbkdf2Module', 'copayApp.filters', diff --git a/src/js/directives/gravatar.js b/src/js/directives/gravatar.js new file mode 100644 index 000000000..2d28168d4 --- /dev/null +++ b/src/js/directives/gravatar.js @@ -0,0 +1,20 @@ +'use strict'; + +angular.module('copayApp.directives') + .directive('gravatar', function(md5) { + return { + restrict: 'AE', + replace: true, + scope: { + name: '@', + height: '@', + width: '@', + email: '@' + }, + link: function(scope, el, attr) { + scope.emailHash = md5.createHash(scope.email || ''); + }, + template: '{{ name }}' + } + }); + diff --git a/src/sass/main.scss b/src/sass/main.scss index 40aea0ae0..5985b0917 100644 --- a/src/sass/main.scss +++ b/src/sass/main.scss @@ -937,6 +937,27 @@ input[type=number] { } } +/** Gravatar **/ + +.gravatar { + border-radius: 50%; +} + +.gravatar-content { + position: relative; + height: 70px; + border-color: #172565; + background-color: #1e3186; + background-image: linear-gradient(0deg, #172565, #172565 0%, transparent 0%); + color: #fff; + margin-bottom: 50px; + .gravatar { + position: absolute; + bottom: -30px; + left: 41%; + } +} + /* Spinner */ .item-icon-left ion-spinner {