From bbf1c632df4be4409a5399d6d23b6482329adb4f Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 12 Oct 2016 15:07:09 -0300 Subject: [PATCH 1/5] Ref copayers view --- src/js/controllers/copayers.js | 14 ++++------ src/sass/views/copayers.scss | 12 ++++++-- www/views/copayers.html | 47 +++++++++++++++----------------- www/views/includes/copayers.html | 12 ++++---- 4 files changed, 44 insertions(+), 41 deletions(-) diff --git a/src/js/controllers/copayers.js b/src/js/controllers/copayers.js index 765db7d52..d9568cb1a 100644 --- a/src/js/controllers/copayers.js +++ b/src/js/controllers/copayers.js @@ -3,15 +3,11 @@ angular.module('copayApp.controllers').controller('copayersController', function($scope, $log, $timeout, $stateParams, $state, $rootScope, $ionicHistory, lodash, profileService, walletService, popupService, platformInfo, gettextCatalog, ongoingProcess) { + $scope.isCordova = platformInfo.isCordova; $scope.$on("$ionicView.beforeEnter", function(event, data) { - init(); - }); - - var init = function() { - $scope.isCordova = platformInfo.isCordova; - $scope.wallet = profileService.getWallet($stateParams.walletId); + $scope.wallet = profileService.getWallet(data.stateParams.walletId); updateWallet(); - }; + }); $rootScope.$on('bwsEvent', function() { updateWallet(); @@ -40,7 +36,9 @@ angular.module('copayApp.controllers').controller('copayersController', }; $scope.showDeletePopup = function() { - popupService.showConfirm(gettextCatalog.getString('Confirm'), gettextCatalog.getString('Are you sure you want to delete this wallet?'), null, null, function(res) { + var title = gettextCatalog.getString('Confirm'); + var msg = gettextCatalog.getString('Are you sure you want to cancel and delete this wallet?'); + popupService.showConfirm(title, msg, null, null, function(res) { if (res) deleteWallet(); }); }; diff --git a/src/sass/views/copayers.scss b/src/sass/views/copayers.scss index 27117e859..2f3458a4e 100644 --- a/src/sass/views/copayers.scss +++ b/src/sass/views/copayers.scss @@ -1,7 +1,13 @@ .copayers-secret { - overflow-wrap: break-word; - word-wrap: break-word; text-align: center; - font-size: 14px; + font-size: 12px; margin: 10px; + white-space: -moz-pre-wrap !important; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + white-space: pre-wrap; + word-wrap: break-word; + white-space: -webkit-pre-wrap; + word-break: break-all; + white-space: normal; } diff --git a/www/views/copayers.html b/www/views/copayers.html index 519ba5195..c026af015 100644 --- a/www/views/copayers.html +++ b/www/views/copayers.html @@ -4,26 +4,29 @@ {{wallet.name}} + + +
- +
Share this invitation with your copayers - -
-
- -
-
- -
-
-
- {{secret || ('Loading...'|translate)}} +
+
+ +
+
+
+
+ {{secret || ('Loading...'|translate)}} +
@@ -36,30 +39,24 @@
-
-

- Waiting for copayers +
+
[ {{wallet.m}}-of-{{wallet.n}} ] -

+ Waiting for copayers +
-
+
- Waiting... + {{'Waiting...'|translate}}
-
+

Wallet incomplete and broken

Delete it and create a new one

- -
- -
diff --git a/www/views/includes/copayers.html b/www/views/includes/copayers.html index 2ab3e5f49..53fbeeebe 100644 --- a/www/views/includes/copayers.html +++ b/www/views/includes/copayers.html @@ -1,8 +1,10 @@ -
- - {{'Me'|translate}} +
+ + + {{'Me'|translate}} - - {{copayer.name}} + + + {{copayer.name}}
From 3d1a3ee98493e8a22a2303f21d1a2930ff2c8022 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 12 Oct 2016 15:50:38 -0300 Subject: [PATCH 2/5] Revert "fix send tip" --- src/js/controllers/tab-send.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 8c74feb78..9636fa305 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -106,7 +106,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function( var updateHasFunds = function() { - $scope.hasFunds = true; + $scope.hasFunds = null; var wallets = profileService.getWallets({ onlyComplete: true, @@ -114,9 +114,6 @@ angular.module('copayApp.controllers').controller('tabSendController', function( if (!wallets || !wallets.length) { $scope.hasFunds = false; - $timeout(function() { - $scope.$apply(); - }); } var index = 0; @@ -127,16 +124,13 @@ angular.module('copayApp.controllers').controller('tabSendController', function( $log.error(err); return; } - if (status.availableBalanceSat && status.availableBalanceSat > 0) { + + if (status.availableBalanceSat) { $scope.hasFunds = true; } - else $scope.hasFunds = false; if (index == wallets.length) { $scope.hasFunds = $scope.hasFunds || false; } - $timeout(function() { - $scope.$apply(); - }) }); }); }; From a505842310c299bb24d91ae39103215b4fd84650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Wed, 12 Oct 2016 15:55:33 -0300 Subject: [PATCH 3/5] fix send tips --- src/js/controllers/tab-send.js | 6 ++++++ www/views/tab-send.html | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 9636fa305..1792ccae1 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -114,6 +114,9 @@ angular.module('copayApp.controllers').controller('tabSendController', function( if (!wallets || !wallets.length) { $scope.hasFunds = false; + $timeout(function() { + $scope.$apply(); + }); } var index = 0; @@ -130,6 +133,9 @@ angular.module('copayApp.controllers').controller('tabSendController', function( } if (index == wallets.length) { $scope.hasFunds = $scope.hasFunds || false; + $timeout(function() { + $scope.$apply(); + }); } }); }); diff --git a/www/views/tab-send.html b/www/views/tab-send.html index 886ea93a7..3432416b4 100644 --- a/www/views/tab-send.html +++ b/www/views/tab-send.html @@ -2,8 +2,8 @@ {{'Send' | translate}} - -
+ +
From 15982e7ce83c432cac0a8b565dc0d975a7917743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Wed, 12 Oct 2016 16:22:02 -0300 Subject: [PATCH 4/5] add scope apply to onboarding rate values --- src/js/controllers/onboarding/tour.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/onboarding/tour.js b/src/js/controllers/onboarding/tour.js index c16eba67e..c2a38791e 100644 --- a/src/js/controllers/onboarding/tour.js +++ b/src/js/controllers/onboarding/tour.js @@ -34,6 +34,9 @@ angular.module('copayApp.controllers').controller('tourController', var rate = rateService.toFiat(btcAmount * 1e8, localCurrency); $scope.localCurrencySymbol = '$'; $scope.localCurrencyPerBtc = $filter('formatFiatAmount')(parseFloat(rate.toFixed(2), 10)); + $timeout(function() { + $scope.$apply(); + }) }); }); @@ -50,7 +53,7 @@ angular.module('copayApp.controllers').controller('tourController', ongoingProcess.set('creatingWallet', false); popupService.showAlert( gettextCatalog.getString('Cannot Create Wallet'), err, - function() { + function() { retryCount = 0; return $scope.createDefaultWallet(); }, gettextCatalog.getString('Retry')); From 146f8a43a395ef0aa823e13f31728778cbf39ad2 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 12 Oct 2016 16:46:44 -0300 Subject: [PATCH 5/5] Fix styling: delete wallet button --- src/sass/buttons.scss | 3 ++- www/views/preferencesDeleteWallet.html | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/sass/buttons.scss b/src/sass/buttons.scss index 5c0c05713..80139248f 100644 --- a/src/sass/buttons.scss +++ b/src/sass/buttons.scss @@ -35,7 +35,8 @@ $button-secondary-active-border: transparent; @include button-outline($button-primary-bg); } &.button-primary, - &.button-secondary { + &.button-secondary, + &.button-assertive { &.button-standard { @extend %button-standard; & + .button-standard { diff --git a/www/views/preferencesDeleteWallet.html b/www/views/preferencesDeleteWallet.html index 176981e40..de664a46b 100644 --- a/www/views/preferencesDeleteWallet.html +++ b/www/views/preferencesDeleteWallet.html @@ -16,6 +16,10 @@

- +
+ +