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;
|
background-color: #C0392A;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.box-notification a.close-notification {
|
||||||
|
position: absolute;
|
||||||
|
top: 8px;
|
||||||
|
right: 10px;
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
.panel.last-transactions {
|
.panel.last-transactions {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-bottom: 2.25rem;
|
margin-bottom: 2.25rem;
|
||||||
|
|
|
@ -62,14 +62,20 @@ angular.module('copayApp.controllers').controller('ProfileController', function(
|
||||||
if (!w) return;
|
if (!w) return;
|
||||||
$scope.isSafari = isMobile.Safari();
|
$scope.isSafari = isMobile.Safari();
|
||||||
$scope.item = w;
|
$scope.item = w;
|
||||||
|
$scope.error = null;
|
||||||
|
$scope.success = null;
|
||||||
|
|
||||||
$scope.deleteWallet = function() {
|
$scope.deleteWallet = function() {
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
identityService.deleteWallet($scope.item, function(err) {
|
identityService.deleteWallet($scope.item, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
$scope.loading = null;
|
||||||
|
$scope.error = err.message;
|
||||||
copay.logger.warn(err);
|
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
|
controller: ModalInstanceCtrl
|
||||||
});
|
});
|
||||||
|
|
||||||
modalInstance.result.then(function() {
|
modalInstance.result.then(function(walletName) {
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
|
$scope.success = 'The wallet "' + walletName + '" was deleted';
|
||||||
$scope.setWallets();
|
$scope.setWallets();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,7 +12,16 @@
|
||||||
<span ng-if="item.usage">({{item.usage}}%) </span>
|
<span ng-if="item.usage">({{item.usage}}%) </span>
|
||||||
</div>
|
</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">
|
<div class="large-6 medium-6 small-6 columns">
|
||||||
<button class="primary tiny" ng-click="downloadWalletBackup()" ng-disabled="loading"
|
<button class="primary tiny" ng-click="downloadWalletBackup()" ng-disabled="loading"
|
||||||
ng-show="!isSafari"><i class="fi-download"></i> Download backup</button>
|
ng-show="!isSafari"><i class="fi-download"></i> Download backup</button>
|
||||||
|
@ -27,7 +36,7 @@
|
||||||
<i class="fi-trash"></i> Delete
|
<i class="fi-trash"></i> Delete
|
||||||
</span>
|
</span>
|
||||||
<span ng-show="loading">
|
<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>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -43,6 +43,17 @@
|
||||||
<div class="row" ng-init="setWallets()">
|
<div class="row" ng-init="setWallets()">
|
||||||
<div class="large-12 columns">
|
<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">
|
<table class="manage-wallets">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue