diff --git a/css/src/main.css b/css/src/main.css index 0bde63293..a693ef294 100644 --- a/css/src/main.css +++ b/css/src/main.css @@ -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; diff --git a/js/controllers/profile.js b/js/controllers/profile.js index ad21e9bf7..ca58d73f8 100644 --- a/js/controllers/profile.js +++ b/js/controllers/profile.js @@ -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(); }); }; diff --git a/views/modals/wallet-info.html b/views/modals/wallet-info.html index fbb68d748..c19f7daf4 100644 --- a/views/modals/wallet-info.html +++ b/views/modals/wallet-info.html @@ -12,7 +12,16 @@ ({{item.usage}}%) -
+
+
+ +
+ + {{error|translate}} + +
+ +
@@ -27,7 +36,7 @@ Delete - Deleting + Deleting...
diff --git a/views/profile.html b/views/profile.html index 41a7a0d78..9b39de6f7 100644 --- a/views/profile.html +++ b/views/profile.html @@ -42,7 +42,18 @@
-

Manage wallets

+

Manage wallets

+ +
+
+ +
+ + {{success|translate}} + + × +
+