add UX to backup tab
This commit is contained in:
parent
93239f7983
commit
b388c3eadf
2 changed files with 35 additions and 27 deletions
|
|
@ -2,13 +2,14 @@
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('BackupController',
|
angular.module('copayApp.controllers').controller('BackupController',
|
||||||
function($scope, $rootScope, $location, backupService, walletFactory, controllerUtils, notification) {
|
function($scope, $rootScope, $location, backupService, walletFactory, controllerUtils, notification) {
|
||||||
var s = ($location.search()).advanced;
|
|
||||||
if (s) {
|
|
||||||
var w = $rootScope.wallet;
|
|
||||||
$scope.advanced = 1;
|
|
||||||
$scope.priv = w.privateKey.toObj().extendedPrivateKeyString;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
$scope.hideAdv=true;
|
||||||
|
$scope.hidePriv=true;
|
||||||
|
|
||||||
|
$scope.getPrivate = function() {
|
||||||
|
var w = $rootScope.wallet;
|
||||||
|
return w.privateKey.toObj().extendedPrivateKeyString;
|
||||||
|
}
|
||||||
|
|
||||||
$scope.downloadBackup = function() {
|
$scope.downloadBackup = function() {
|
||||||
var w = $rootScope.wallet;
|
var w = $rootScope.wallet;
|
||||||
|
|
|
||||||
|
|
@ -17,28 +17,35 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="oh large-12 columns panel" ng-if="priv">
|
<p>
|
||||||
<h3><i class="fi-minus-circle m10r"></i> Master Private Key </h3>
|
<a class="expand" ng-click="hideAdv=!hideAdv">
|
||||||
<p class="large-8 columns text-gray"> Your master private key contains the information to sign <b>any</b> transaction on this wallet. Handle with care.
|
<span ng-hide="!hideAdv">Show</span>
|
||||||
<div class="large-4 columns">
|
<span ng-hide="hideAdv">Hide</span>
|
||||||
<a class="button expand" ng-click="showPriv=!showPriv">
|
advanced options
|
||||||
<span ng-hide="showPriv">Show</span>
|
</a>
|
||||||
<span ng-hide="!showPriv">Hide</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
<div ng-hide="hideAdv">
|
||||||
<textarea class="text-gray" ng-hide="!showPriv">
|
<div class="oh large-12 columns panel">
|
||||||
{{priv}}
|
<h3><i class="fi-minus-circle m10r"></i> Master Private Key </h3>
|
||||||
</textarea>
|
<p class="large-8 columns text-gray"> Your master private key contains the information to sign <b>any</b> transaction on this wallet. Handle with care.
|
||||||
</p>
|
<div class="large-4 columns">
|
||||||
</div>
|
<a class="button expand" ng-click="hidePriv=!hidePriv">
|
||||||
<div class="oh large-12 columns panel" ng-if="advanced">
|
<span ng-hide="!hidePriv">Show</span>
|
||||||
<h3><i class="fi-minus-circle m10r"></i> Scan Wallet Addresses </h3>
|
<span ng-hide="hidePriv">Hide</span>
|
||||||
<p class="large-8 columns text-gray"> This will scan the blockchain looking for addresses derived from your wallet, in case you have funds in addresses not yet generated (e.g.: you restored an old backup).
|
</a>
|
||||||
<div class="large-4 columns">
|
</div>
|
||||||
<a class="button expand" ng-click="updateIndexes()">
|
<textarea ng-hide="hidePriv" readonly>{{getPrivate()}}</textarea>
|
||||||
Scan
|
</div>
|
||||||
</a>
|
<div class="oh large-12 columns panel">
|
||||||
</div>
|
<h3><i class="fi-minus-circle m10r"></i> Scan Wallet Addresses </h3>
|
||||||
|
<p class="large-8 columns text-gray"> This will scan the blockchain looking for addresses derived from your wallet, in case you have funds in addresses not yet generated (e.g.: you restored an old backup).
|
||||||
|
<div class="large-4 columns">
|
||||||
|
<a class="button expand" ng-click="updateIndexes()">
|
||||||
|
Scan
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue