From 17a70c1d5084218a4c6289d11a623c8d0f8f50a0 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 18 Feb 2015 16:38:43 -0300 Subject: [PATCH 1/8] Fix Addressbook --- js/controllers/send.js | 19 +++++++++++++++++-- views/modals/address-book.html | 14 +++++++------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/js/controllers/send.js b/js/controllers/send.js index ad3e861b5..37282e913 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -534,7 +534,8 @@ angular.module('copayApp.controllers').controller('SendController', }; $scope.cancel = function(form) { - $scope.error = $scope.success = null; + $scope.error = $scope.success = $scope.newaddress = $scope.newlabel = null; + clearForm(form); $scope.toggleForm(); }; @@ -542,11 +543,23 @@ angular.module('copayApp.controllers').controller('SendController', $scope.showForm = !$scope.showForm; }; + var clearForm = function(form) { + form.newaddress.$pristine = true; + form.newaddress.$setViewValue(''); + form.newaddress.$render(); + + form.newlabel.$pristine = true; + form.newlabel.$setViewValue(''); + form.newlabel.$render(); + form.$setPristine(); + }; + // TODO change to modal $scope.submitAddressBook = function(form) { if (form.$invalid) { return; } + $scope.loading = true; $timeout(function() { var errorMsg; var entry = { @@ -563,11 +576,13 @@ angular.module('copayApp.controllers').controller('SendController', if (errorMsg) { $scope.error = errorMsg; } else { + clearForm(form); $scope.toggleForm(); notification.success('Entry created', 'New addressbook entry created') } + $scope.loading = false; $rootScope.$digest(); - }, 1); + }, 100); return; }; diff --git a/views/modals/address-book.html b/views/modals/address-book.html index bb733ddb5..3c2f6bfe4 100644 --- a/views/modals/address-book.html +++ b/views/modals/address-book.html @@ -42,9 +42,9 @@ - -
-
+
@@ -75,14 +75,14 @@ placeholder="{{'Label'|translate}}" ng-model="newlabel" required>
- Cancel + Cancel -
-
From 59d6bec60f4eb927a899b009ad94d561ea9efd09 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 18 Feb 2015 19:19:01 -0300 Subject: [PATCH 2/8] Fix send view --- views/send.html | 96 +++++++++++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 51 deletions(-) diff --git a/views/send.html b/views/send.html index f3a6fdd3d..8f0f45f1c 100644 --- a/views/send.html +++ b/views/send.html @@ -1,40 +1,42 @@
-
-
-
- -
-
-

Available Balance: {{$root.wallet.balanceInfo.availableBalance}} {{$root.wallet.settings.unitName}}

- {{$root.wallet.balanceInfo.lockedBalance}} {{$root.wallet.settings.unitName}} in pending transactions -
-
-
- -
-
-

{{$root.title}}

-
-
- -
+
-
-
- -
- - Fetching Payment Information... - +
+ +
+
+

Available Balance: {{$root.wallet.balanceInfo.availableBalance}} {{$root.wallet.settings.unitName}}

+ {{$root.wallet.balanceInfo.lockedBalance}} {{$root.wallet.settings.unitName}} in pending transactions
- -
+
-
+
+
+

{{$root.title}}

+
+
+ +
+ +
+
+
+
+
+ +
+ + Fetching Payment Information... + +
+
@@ -63,15 +65,15 @@ - - - - - Not valid - - - - + + + + + Not valid + + + +
@@ -101,10 +103,10 @@
- Not valid + Not valid - +
@@ -141,21 +143,13 @@
-
+
-
-
- -
- -
-
- + Cancel
From 4285c0e81e51ccf8ce6511aa84a6837e11ea8bbe Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 18 Feb 2015 19:19:34 -0300 Subject: [PATCH 3/8] Fix paypro popup info --- js/controllers/send.js | 5 ++++- views/modals/paypro.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/controllers/send.js b/js/controllers/send.js index 37282e913..2c7a372d8 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -407,10 +407,13 @@ angular.module('copayApp.controllers').controller('SendController', var $oscope = $scope; $scope.openPPModal = function(merchantData) { var ModalInstanceCtrl = function($scope, $modalInstance) { + var w = $rootScope.wallet; + var satToUnit = 1 / w.settings.unitToSatoshi; $scope.md = merchantData; $scope.alternative = $oscope._alternative; $scope.alternativeIsoCode = $oscope.alternativeIsoCode; $scope.isRateAvailable = $oscope.isRateAvailable; + $scope.unitTotal = (merchantData.total * satToUnit).toFixed(w.settings.unitDecimals); $scope.cancel = function() { $modalInstance.dismiss('cancel'); @@ -418,7 +421,7 @@ angular.module('copayApp.controllers').controller('SendController', }; $modal.open({ templateUrl: 'views/modals/paypro.html', - windowClass: 'tiny', + windowClass: 'medium', controller: ModalInstanceCtrl, }); }; diff --git a/views/modals/paypro.html b/views/modals/paypro.html index 127cafb13..204f60b21 100644 --- a/views/modals/paypro.html +++ b/views/modals/paypro.html @@ -4,7 +4,7 @@ -
+
+
+
+ Getting transactions... +
+
+
+
From 1c7a48e82729b448f53118fc2e9916ae9bb24225 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 19 Feb 2015 11:06:24 -0300 Subject: [PATCH 6/8] Fix popup tx-details/addressbook/txp-details --- views/modals/address-book.html | 12 +++++------- views/modals/tx-details.html | 12 ++++++------ views/modals/txp-details.html | 6 ++---- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/views/modals/address-book.html b/views/modals/address-book.html index 3c2f6bfe4..3d23d0d1f 100644 --- a/views/modals/address-book.html +++ b/views/modals/address-book.html @@ -1,8 +1,7 @@ - -
- - Unconfirmed +
+ Confirmations: + + Unconfirmed - - Confirmations: -

{{btx.confirmations}}

+ + {{btx.confirmations}}
diff --git a/views/modals/txp-details.html b/views/modals/txp-details.html index 3b6ccca2e..d0d700a4d 100644 --- a/views/modals/txp-details.html +++ b/views/modals/txp-details.html @@ -90,16 +90,14 @@
From 174c6cb3def7bf08f94704020df361a4153c8cc5 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 19 Feb 2015 17:02:07 -0300 Subject: [PATCH 7/8] Fix address list from receive section. Fix response when delete a wallet. --- css/src/main.css | 6 +- js/controllers/copayers.js | 35 ++++---- js/controllers/more.js | 29 +++---- js/controllers/receive.js | 2 +- views/copayers.html | 142 +++++++++++++++++---------------- views/includes/copayers.html | 10 +-- views/modals/address-book.html | 4 +- views/modals/qr-address.html | 12 ++- views/receive.html | 19 ++--- views/settings.html | 12 +-- 10 files changed, 137 insertions(+), 134 deletions(-) diff --git a/css/src/main.css b/css/src/main.css index 22d4ff963..cfcdf7c46 100644 --- a/css/src/main.css +++ b/css/src/main.css @@ -616,11 +616,6 @@ ul.tx-copayers { .ma { margin: 0 auto;} .tu {text-transform: uppercase;} -.small { - font-size: 60%; - line-height: inherit; -} - .line-dashed-setuph-v { border-left: 1px dashed #415970; } @@ -850,6 +845,7 @@ input[type=number]::-webkit-outer-spin-button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + padding-top: 3px; } ul.pagination li.current a { diff --git a/js/controllers/copayers.js b/js/controllers/copayers.js index 9fc338ad0..877efd6f0 100644 --- a/js/controllers/copayers.js +++ b/js/controllers/copayers.js @@ -33,25 +33,24 @@ angular.module('copayApp.controllers').controller('CopayersController', }; $scope.deleteWallet = function() { - $scope.loading = true; - identityService.deleteWallet(w, function(err) { - if (err) { - $scope.loading = null; - $scope.error = err.message || err; - copay.logger.warn(err); - $timeout(function() { - $scope.$digest(); - }); - } else { - $scope.loading = false; - if ($rootScope.wallet) { - go.walletHome(); + $rootScope.starting = true; + $timeout(function() { + identityService.deleteWallet(w, function(err) { + $rootScope.starting = false; + if (err) { + $scope.error = err.message || err; + copay.logger.warn(err); + $timeout(function () { $scope.$digest(); }); + } else { + if ($rootScope.wallet) { + go.walletHome(); + } + $timeout(function() { + notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted'); + }); } - $timeout(function() { - notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted'); - }); - } - }); + }); + }, 100); }; $scope.copySecret = function(secret) { diff --git a/js/controllers/more.js b/js/controllers/more.js index dd633372f..0ab271512 100644 --- a/js/controllers/more.js +++ b/js/controllers/more.js @@ -119,22 +119,23 @@ angular.module('copayApp.controllers').controller('MoreController', $scope.deleteWallet = function() { $scope.loading = true; - identityService.deleteWallet(w, function(err) { - if (err) { - $scope.loading = null; - $scope.error = err.message || err; - copay.logger.warn(err); - $timeout(function () { $scope.$digest(); }); - } else { + $timeout(function() { + identityService.deleteWallet(w, function(err) { $scope.loading = false; - if ($rootScope.wallet) { - go.walletHome(); + if (err) { + $scope.error = err.message || err; + copay.logger.warn(err); + $timeout(function () { $scope.$digest(); }); + } else { + if ($rootScope.wallet) { + go.walletHome(); + } + $timeout(function() { + notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted'); + }); } - $timeout(function() { - notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted'); - }); - } - }); + }); + }, 100); }; $scope.copyText = function(text) { diff --git a/js/controllers/receive.js b/js/controllers/receive.js index 0a9e9c7ed..cdaa0b868 100644 --- a/js/controllers/receive.js +++ b/js/controllers/receive.js @@ -60,7 +60,7 @@ angular.module('copayApp.controllers').controller('ReceiveController', $modal.open({ templateUrl: 'views/modals/qr-address.html', - windowClass: 'tiny', + windowClass: 'small', controller: ModalInstanceCtrl, resolve: { address: function() { diff --git a/views/copayers.html b/views/copayers.html index bd9efe3b3..a38b5a25e 100644 --- a/views/copayers.html +++ b/views/copayers.html @@ -1,80 +1,86 @@
-
-
-

Share this secret with your copayers

-
+
+
- -
-
- -
-
-
-
- -
- - Please note the wallet creator must be online until all copayers have joined. - -
- -
-
- -
-
- {{secret}} -
-
-
- - Share secret - -
-
-

{{$root.wallet.getName()}}

- - [{{$root.wallet.requiredCopayers}} of {{$root.wallet.totalCopayers}} ] - - in TESTNET -
-
+ +
+
+
+

Share this secret with your copayers

-
-
-

Waiting for copayers

-
-
-
-

+ +

+
+ +
+
+
+
+ +
+ + Please note the wallet creator must be online until all copayers have joined. + +
+ +
+
+ +
+
+ {{secret}} +
+
+
+ + Share secret + +
+
+

{{$root.wallet.getName()}}

+ + [{{$root.wallet.requiredCopayers}} of {{$root.wallet.totalCopayers}} ] + + in TESTNET +
+
+
+
+
+
+

Waiting for copayers

+
+
+
+

Waiting... -

+

+
+
- -
- -
-
- -
-

Are you sure you want to cancel and delete this wallet

-
-
- -
-
- + +
+
+ +
+

Are you sure you want to cancel and delete this wallet

+
+
+ +
+
+ +
diff --git a/views/includes/copayers.html b/views/includes/copayers.html index 3180d4b46..e69dbda3c 100644 --- a/views/includes/copayers.html +++ b/views/includes/copayers.html @@ -6,12 +6,12 @@
- + {{'Me'|translate}} - - + + {{copayer.nick}} - +
- \ No newline at end of file + diff --git a/views/modals/address-book.html b/views/modals/address-book.html index 3d23d0d1f..602fc10f9 100644 --- a/views/modals/address-book.html +++ b/views/modals/address-book.html @@ -27,8 +27,8 @@ ng-repeat="(addr, info) in addressBook" ng-class="{'addressbook-disabled': info.hidden}"> - {{info.label}} -
{{::addr}}
+ {{info.label}}
+ {{::addr}} {{$root.wallet.publicKeyRing.nicknameForCopayer(info.copayerId)}} diff --git a/views/modals/qr-address.html b/views/modals/qr-address.html index 2df6dc4fd..24af02226 100644 --- a/views/modals/qr-address.html +++ b/views/modals/qr-address.html @@ -4,14 +4,18 @@