diff --git a/Gruntfile.js b/Gruntfile.js index 55eeb99f7..907f8c706 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -123,7 +123,7 @@ module.exports = function(grunt) { 'lib/file-saver/FileSaver.js', 'lib/socket.io-client/socket.io.js', 'lib/sjcl.js', - 'lib/ios-imagefile-megapixel/megapix-image.js', + 'lib/ios-imagefile-megapixel/megapix-image.js', 'lib/qrcode-decoder-js/lib/qrcode-decoder.min.js', 'lib/zeroclipboard/ZeroClipboard.min.js' ], @@ -139,7 +139,9 @@ module.exports = function(grunt) { 'lib/angular-foundation/mm-foundation.min.js', 'lib/angular-foundation/mm-foundation-tpls.min.js', 'lib/angular-gettext/dist/angular-gettext.min.js', - 'lib/angular-load/angular-load.min.js' + 'lib/angular-load/angular-load.min.js', + 'lib/angular-gravatar/build/md5.min.js', + 'lib/angular-gravatar/build/angular-gravatar.min.js' // If you add libs here, remember to add it too to karma.conf ], dest: 'lib/angularjs-all.js' diff --git a/bower.json b/bower.json index ab97d836e..c77f71035 100644 --- a/bower.json +++ b/bower.json @@ -24,7 +24,8 @@ "ng-idle": "*", "inherits": "~0.0.1", "angular-load": "0.2.0", - "lodash": "~2.4.1" + "lodash": "~2.4.1", + "angular-gravatar": "*" }, "resolutions": { "angular": "=1.2.19" diff --git a/css/src/main.css b/css/src/main.css index 9e46e8b4a..d0c4b7fc1 100644 --- a/css/src/main.css +++ b/css/src/main.css @@ -1077,6 +1077,10 @@ button.gray:focus, overflow: hidden; } +.fi-trash.text-gray:hover { + color: #CA5649; +} + .photo-container { margin-right: 3px; display: inline-block; @@ -1090,6 +1094,11 @@ button.gray:focus, text-align: center; } +.photo-container.profile { + width: 80px; + height: 80px; +} + a:hover .photo-container { background: #34495E; color: #fff; diff --git a/img/change-avatar.png b/img/change-avatar.png new file mode 100644 index 000000000..6c0ed0826 Binary files /dev/null and b/img/change-avatar.png differ diff --git a/js/app.js b/js/app.js index 1caa20b24..9f2c8e53a 100644 --- a/js/app.js +++ b/js/app.js @@ -23,6 +23,7 @@ var modules = [ 'monospaced.qrcode', 'ngIdle', 'gettext', + 'ui.gravatar', 'copayApp.filters', 'copayApp.services', 'copayApp.controllers', @@ -44,6 +45,15 @@ copayApp.config(function($sceDelegateProvider) { ]); }); +angular.module('ui.gravatar').config([ + 'gravatarServiceProvider', function(gravatarServiceProvider) { + gravatarServiceProvider.defaults = { + size : 35 + }; + // Use https endpoint + gravatarServiceProvider.secure = true; + } +]); angular.module('copayApp.filters', []); angular.module('copayApp.services', []); diff --git a/js/controllers/profile.js b/js/controllers/profile.js index 8794d809a..1d5280968 100644 --- a/js/controllers/profile.js +++ b/js/controllers/profile.js @@ -1,5 +1,6 @@ 'use strict'; angular.module('copayApp.controllers').controller('ProfileController', function($scope, $rootScope, $location, $modal, controllerUtils, backupService) { + $scope.username = $rootScope.iden.getName(); $scope.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; $rootScope.title = 'Profile'; diff --git a/karma.conf.js b/karma.conf.js index babd35e39..bf3e3bbb5 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -29,6 +29,8 @@ module.exports = function(config) { 'lib/angular-foundation/mm-foundation.min.js', 'lib/angular-foundation/mm-foundation-tpls.min.js', 'lib/angular-load/angular-load.min.js', + 'lib/angular-gravatar/build/md5.min.js', + 'lib/angular-gravatar/build/angular-gravatar.min.js', 'lib/angular-gettext/dist/angular-gettext.min.js', 'lib/inherits/inherits.js', 'lib/lodash/dist/lodash.js', diff --git a/package.json b/package.json index a09fd72d6..ce1061833 100644 --- a/package.json +++ b/package.json @@ -88,6 +88,7 @@ "sinon": "^1.10.3", "socket.io-client": "^1.0.6", "travis-cov": "^0.2.5", - "uglifyify": "^1.2.3" + "uglifyify": "^1.2.3", + "angular-gravatar": "*" } } diff --git a/views/includes/copayer.html b/views/includes/copayer.html index 2af6f63b1..846aa50a6 100644 --- a/views/includes/copayer.html +++ b/views/includes/copayer.html @@ -1,6 +1,6 @@
- +
- +
+ +
{{username}}
diff --git a/views/profile.html b/views/profile.html index cf08e592f..248ce524d 100644 --- a/views/profile.html +++ b/views/profile.html @@ -4,20 +4,34 @@
-

Backup Profile

-

It's important to backup your profile so that you can recover it in case of disaster. The backup will include all your profile's wallets

- Backup profile - View profile backup -
- -
- Copy to clipboard +
+ -
- Copy this text as it is in a safe place (notepad or email) +
+

Backup Profile

+

It's important to backup your profile so that you can recover it in case of disaster. The backup will include all your profile's wallets

+
+ +
+
+
+ +
+ Copy to clipboard +
+
+ Copy this text as it is in a safe place (notepad or email) +
@@ -53,19 +67,17 @@ {{item.balanceInfo.totalBalance || 0 |noFractionNumber}} {{item.settings.unitName}} - +
- +     - + ng-show="loading != item.id">