commit
6985d21233
11 changed files with 66 additions and 26 deletions
|
|
@ -123,7 +123,7 @@ module.exports = function(grunt) {
|
||||||
'lib/file-saver/FileSaver.js',
|
'lib/file-saver/FileSaver.js',
|
||||||
'lib/socket.io-client/socket.io.js',
|
'lib/socket.io-client/socket.io.js',
|
||||||
'lib/sjcl.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/qrcode-decoder-js/lib/qrcode-decoder.min.js',
|
||||||
'lib/zeroclipboard/ZeroClipboard.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.min.js',
|
||||||
'lib/angular-foundation/mm-foundation-tpls.min.js',
|
'lib/angular-foundation/mm-foundation-tpls.min.js',
|
||||||
'lib/angular-gettext/dist/angular-gettext.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
|
// If you add libs here, remember to add it too to karma.conf
|
||||||
],
|
],
|
||||||
dest: 'lib/angularjs-all.js'
|
dest: 'lib/angularjs-all.js'
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@
|
||||||
"ng-idle": "*",
|
"ng-idle": "*",
|
||||||
"inherits": "~0.0.1",
|
"inherits": "~0.0.1",
|
||||||
"angular-load": "0.2.0",
|
"angular-load": "0.2.0",
|
||||||
"lodash": "~2.4.1"
|
"lodash": "~2.4.1",
|
||||||
|
"angular-gravatar": "*"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"angular": "=1.2.19"
|
"angular": "=1.2.19"
|
||||||
|
|
|
||||||
|
|
@ -1077,6 +1077,10 @@ button.gray:focus,
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fi-trash.text-gray:hover {
|
||||||
|
color: #CA5649;
|
||||||
|
}
|
||||||
|
|
||||||
.photo-container {
|
.photo-container {
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
@ -1090,6 +1094,11 @@ button.gray:focus,
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.photo-container.profile {
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
a:hover .photo-container {
|
a:hover .photo-container {
|
||||||
background: #34495E;
|
background: #34495E;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
|
||||||
BIN
img/change-avatar.png
Normal file
BIN
img/change-avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.5 KiB |
10
js/app.js
10
js/app.js
|
|
@ -23,6 +23,7 @@ var modules = [
|
||||||
'monospaced.qrcode',
|
'monospaced.qrcode',
|
||||||
'ngIdle',
|
'ngIdle',
|
||||||
'gettext',
|
'gettext',
|
||||||
|
'ui.gravatar',
|
||||||
'copayApp.filters',
|
'copayApp.filters',
|
||||||
'copayApp.services',
|
'copayApp.services',
|
||||||
'copayApp.controllers',
|
'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.filters', []);
|
||||||
angular.module('copayApp.services', []);
|
angular.module('copayApp.services', []);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
angular.module('copayApp.controllers').controller('ProfileController', function($scope, $rootScope, $location, $modal, controllerUtils, backupService) {
|
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;
|
$scope.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
|
||||||
|
|
||||||
$rootScope.title = 'Profile';
|
$rootScope.title = 'Profile';
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ module.exports = function(config) {
|
||||||
'lib/angular-foundation/mm-foundation.min.js',
|
'lib/angular-foundation/mm-foundation.min.js',
|
||||||
'lib/angular-foundation/mm-foundation-tpls.min.js',
|
'lib/angular-foundation/mm-foundation-tpls.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',
|
||||||
'lib/angular-gettext/dist/angular-gettext.min.js',
|
'lib/angular-gettext/dist/angular-gettext.min.js',
|
||||||
'lib/inherits/inherits.js',
|
'lib/inherits/inherits.js',
|
||||||
'lib/lodash/dist/lodash.js',
|
'lib/lodash/dist/lodash.js',
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@
|
||||||
"sinon": "^1.10.3",
|
"sinon": "^1.10.3",
|
||||||
"socket.io-client": "^1.0.6",
|
"socket.io-client": "^1.0.6",
|
||||||
"travis-cov": "^0.2.5",
|
"travis-cov": "^0.2.5",
|
||||||
"uglifyify": "^1.2.3"
|
"uglifyify": "^1.2.3",
|
||||||
|
"angular-gravatar": "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<div ng-controller="CopayersController">
|
<div ng-controller="CopayersController">
|
||||||
<div class="copay-box" ng-repeat="copayer in copayersList()">
|
<div class="copay-box" ng-repeat="copayer in copayersList()">
|
||||||
<span ng-include="'views/includes/photo.html'"></span>
|
<img gravatar-src="'{{copayer.nick}}'" gravatar-size="35">
|
||||||
<div
|
<div
|
||||||
class="ellipsis"
|
class="ellipsis"
|
||||||
tooltip="ID: {{copayer.peerId}}"
|
tooltip="ID: {{copayer.peerId}}"
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,9 @@
|
||||||
<div class="menu" ng-mouseover="hoverIn()" ng-mouseleave="hoverOut()"
|
<div class="menu" ng-mouseover="hoverIn()" ng-mouseleave="hoverOut()"
|
||||||
ng-click="hoverMenu = !hoverMenu">
|
ng-click="hoverMenu = !hoverMenu">
|
||||||
<a class="dropdown ellipsis text-gray" ng-class="{'hover': hoverMenu}">
|
<a class="dropdown ellipsis text-gray" ng-class="{'hover': hoverMenu}">
|
||||||
<span ng-include="'views/includes/photo.html'"></span>
|
<div class="photo-container">
|
||||||
|
<img gravatar-src="'{{username}}'" gravatar-size="35">
|
||||||
|
</div>
|
||||||
<span class="m15t">{{username}} </span>
|
<span class="m15t">{{username}} </span>
|
||||||
<i class="icon-arrow-down size-16 vm"></i>
|
<i class="icon-arrow-down size-16 vm"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -4,20 +4,34 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="large-12 columns">
|
<div class="large-12 columns">
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<h2><i class="fi-download m10r"></i> <span translate>Backup Profile</span></h2>
|
<div class="row">
|
||||||
<p translate class="text-gray">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</p>
|
<div class="large-2 medium-2 columns text-center">
|
||||||
<a translate class="button primary m0" ng-click="downloadProfileBackup()"
|
<a class="photo-container profile" href="https://en.gravatar.com/" ng-init="isHover=0" ng-mouseenter="isHover=1" ng-mouseleave="isHover=0" target="_blank">
|
||||||
ng-show="!isSafari">Backup profile</a>
|
<img ng-show="!isHover" gravatar-src="'{{username}}'" gravatar-size="80">
|
||||||
<a translate class="button primary m0" ng-click="viewProfileBackup()"
|
<img ng-show="isHover" src="img/change-avatar.png" with="80">
|
||||||
ng-show="isSafari && !hideViewProfileBackup">View profile backup</a>
|
</a>
|
||||||
<div ng-show="backupProfilePlainText">
|
|
||||||
<textarea rows="5">{{backupProfilePlainText}}</textarea>
|
|
||||||
<div class="show-for-large-up">
|
|
||||||
<span translate class="size-12">Copy to clipboard</span> <span
|
|
||||||
class="btn-copy" clip-copy="backupProfilePlainText"> </span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="hide-for-large-up">
|
<div class="large-7 medium-7 columns">
|
||||||
<span translate class="size-12">Copy this text as it is in a safe place (notepad or email)</span>
|
<h2>Backup Profile</h2>
|
||||||
|
<p translate class="text-gray">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</p>
|
||||||
|
</div>
|
||||||
|
<div class="large-3 medium-3 columns">
|
||||||
|
<a translate class="button primary m0" ng-click="downloadProfileBackup()"
|
||||||
|
ng-show="!isSafari">Backup profile</a>
|
||||||
|
<a translate class="button primary m0" ng-click="viewProfileBackup()"
|
||||||
|
ng-show="isSafari && !hideViewProfileBackup">View profile backup</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" ng-show="backupProfilePlainText">
|
||||||
|
<div class="large-12 columns">
|
||||||
|
<textarea rows="5">{{backupProfilePlainText}}</textarea>
|
||||||
|
<div class="show-for-large-up">
|
||||||
|
<span translate class="size-12">Copy to clipboard</span> <span
|
||||||
|
class="btn-copy" clip-copy="backupProfilePlainText"> </span>
|
||||||
|
</div>
|
||||||
|
<div class="hide-for-large-up">
|
||||||
|
<span translate class="size-12">Copy this text as it is in a safe place (notepad or email)</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -53,19 +67,17 @@
|
||||||
{{item.balanceInfo.totalBalance || 0 |noFractionNumber}} {{item.settings.unitName}}
|
{{item.balanceInfo.totalBalance || 0 |noFractionNumber}} {{item.settings.unitName}}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td width="70" class="text-center">
|
<td width="90" class="text-center">
|
||||||
|
|
||||||
<div ng-show="loading != item.id">
|
<div ng-show="loading != item.id">
|
||||||
<a title="Download Backup" ng-click="downloadWalletBackup(item)"
|
<a title="Download Backup" class="text-gray" ng-click="downloadWalletBackup(item)"
|
||||||
ng-show="!isSafari"><i class="fi-download"></i></a>
|
ng-show="!isSafari"><i class="fi-download size-18 m10r"></i></a>
|
||||||
<a title="View Backup" ng-click="viewWalletBackup(item)"
|
<a title="View Backup" ng-click="viewWalletBackup(item)"
|
||||||
ng-show="isSafari"><i class="fi-eye"></i></a>
|
ng-show="isSafari"><i class="fi-eye"></i></a>
|
||||||
|
|
||||||
<a title="Delete Wallet"
|
<a title="Delete Wallet" ng-really-message="{{'Are you sure you want to delete the wallet'}} {{(item.name || item.id)}}"
|
||||||
class="text-warning"
|
|
||||||
ng-really-message="{{'Are you sure you want to delete the wallet'}} {{(item.name || item.id)}}"
|
|
||||||
ng-really-click="deleteWallet(item)"
|
ng-really-click="deleteWallet(item)"
|
||||||
ng-show="loading != item.id"><i class="fi-trash"></i></a>
|
ng-show="loading != item.id"><i class="fi-trash text-gray size-18"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<span ng-show="loading == item.id"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
|
<span ng-show="loading == item.id"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue