mirror of https://github.com/BTCPrivate/copay.git
fix notification when deleting wallet
This commit is contained in:
parent
5873f30262
commit
c122cb3488
|
@ -396,6 +396,13 @@ a:hover {
|
|||
background-color: #C0392A;
|
||||
}
|
||||
|
||||
.box-notification a.close-notification {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 10px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.panel.last-transactions {
|
||||
padding: 0;
|
||||
margin-bottom: 2.25rem;
|
||||
|
|
|
@ -62,14 +62,20 @@ angular.module('copayApp.controllers').controller('ProfileController', function(
|
|||
if (!w) return;
|
||||
$scope.isSafari = isMobile.Safari();
|
||||
$scope.item = w;
|
||||
$scope.error = null;
|
||||
$scope.success = null;
|
||||
|
||||
$scope.deleteWallet = function() {
|
||||
$scope.loading = true;
|
||||
identityService.deleteWallet($scope.item, function(err) {
|
||||
if (err) {
|
||||
$scope.loading = null;
|
||||
$scope.error = err.message;
|
||||
copay.logger.warn(err);
|
||||
}
|
||||
$modalInstance.close();
|
||||
else {
|
||||
$modalInstance.close($scope.item.name || $scope.item.id);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -92,8 +98,9 @@ angular.module('copayApp.controllers').controller('ProfileController', function(
|
|||
controller: ModalInstanceCtrl
|
||||
});
|
||||
|
||||
modalInstance.result.then(function() {
|
||||
modalInstance.result.then(function(walletName) {
|
||||
$scope.loading = false;
|
||||
$scope.success = 'The wallet "' + walletName + '" was deleted';
|
||||
$scope.setWallets();
|
||||
});
|
||||
};
|
||||
|
|
|
@ -12,7 +12,16 @@
|
|||
<span ng-if="item.usage">({{item.usage}}%) </span>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="!backupWalletPlainText">
|
||||
<div class="box-notification" ng-show="error">
|
||||
<div class="box-icon error">
|
||||
<i class="fi-x size-24"></i>
|
||||
</div>
|
||||
<span class="text-warning size-14">
|
||||
{{error|translate}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="!backupWalletPlainText && !error">
|
||||
<div class="large-6 medium-6 small-6 columns">
|
||||
<button class="primary tiny" ng-click="downloadWalletBackup()" ng-disabled="loading"
|
||||
ng-show="!isSafari"><i class="fi-download"></i> Download backup</button>
|
||||
|
@ -27,7 +36,7 @@
|
|||
<i class="fi-trash"></i> Delete
|
||||
</span>
|
||||
<span ng-show="loading">
|
||||
<i class="fi-bitcoin-circle icon-rotate spinner"></i> Deleting
|
||||
<i class="fi-bitcoin-circle icon-rotate spinner"></i> Deleting...
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -42,7 +42,18 @@
|
|||
|
||||
<div class="row" ng-init="setWallets()">
|
||||
<div class="large-12 columns">
|
||||
<h2>Manage wallets</h2>
|
||||
<h2>Manage wallets</h2>
|
||||
|
||||
<div class="box-notification" ng-show="success">
|
||||
<div class="box-icon success">
|
||||
<i class="fi-check size-24"></i>
|
||||
</div>
|
||||
<span class="text-success size-14">
|
||||
{{success|translate}}
|
||||
</span>
|
||||
<a href ng-click="success=false" class="close-notification success">×</a>
|
||||
</div>
|
||||
|
||||
<table class="manage-wallets">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue