Merge pull request #1062 from cmgustavo/feature/01-delete
Add delete wallet from the intermediate screen
This commit is contained in:
commit
0ca9bbe86b
4 changed files with 17 additions and 4 deletions
|
|
@ -1006,7 +1006,7 @@ input.ng-invalid-match, input.ng-invalid-match:focus {
|
|||
.text-primary {color: #1ABC9C;}
|
||||
.text-secondary {color: #3498DB;}
|
||||
.text-white {color: #fff;}
|
||||
|
||||
.text-warning {color: #CA5649;}
|
||||
|
||||
.footer-setup a.text-gray:hover {color: #fff;}
|
||||
a.text-gray:hover {color: #2C3E50;}
|
||||
|
|
@ -1014,6 +1014,7 @@ a.text-black:hover {color: #213140;}
|
|||
a.text-primary:hover {color: #50E3C2;}
|
||||
a.text-secondary:hover {color: #4A90E2;}
|
||||
a.text-white:hover {color: #ccc;}
|
||||
a.text-warning:hover {color: #FD7262;}
|
||||
|
||||
.box-setup-copayers {
|
||||
background: #2C3E50;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('CopayersController',
|
||||
function($scope, $rootScope, $location, backupService) {
|
||||
function($scope, $rootScope, $location, backupService, walletFactory, controllerUtils) {
|
||||
|
||||
$scope.backup = function() {
|
||||
var w = $rootScope.wallet;
|
||||
|
|
@ -18,4 +18,12 @@ angular.module('copayApp.controllers').controller('CopayersController',
|
|||
$location.path('/addresses');
|
||||
};
|
||||
|
||||
$scope.deleteWallet = function() {
|
||||
var w = $rootScope.wallet;
|
||||
w.disconnect();
|
||||
walletFactory.delete(w.id, function() {
|
||||
controllerUtils.logout();
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@ angular.module('copayApp.controllers').controller('HomeController',
|
|||
if ($rootScope.pendingPayment) {
|
||||
notification.info('Login Required', 'Please open wallet to complete payment');
|
||||
}
|
||||
$scope.hasWallets = walletFactory.getWallets().length > 0 ? true : false;
|
||||
$scope.hasWallets = (walletFactory.getWallets() && walletFactory.getWallets().length > 0) ? true : false;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -74,8 +74,12 @@
|
|||
</div>
|
||||
|
||||
<div class="text-right">
|
||||
<a class="text-warning" ng-really-click="deleteWallet()"
|
||||
ng-really-message="Are you sure to delete this wallet from this
|
||||
computer?">Delete wallet</a>
|
||||
<span class="text-gray">|</span>
|
||||
<a class="text-primary m20r" ng-click="downloadBackup()"
|
||||
ng-show="!$root.wallet.publicKeyRing.isComplete()">Download seed backup</a>
|
||||
ng-show="!$root.wallet.publicKeyRing.isComplete()">Download seed backup</a>
|
||||
<button class="button primary m0"
|
||||
ng-click="backup()"
|
||||
ng-show="!$root.wallet.publicKeyRing.isBackupReady()"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue