From 1b86f78328cf7890a0269d831e9e29248e30c55a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Fri, 30 Sep 2016 16:12:23 -0300 Subject: [PATCH 1/7] move new wallet creation to wallet card --- public/views/tab-home.html | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/public/views/tab-home.html b/public/views/tab-home.html index 7ef233580..3cfdb0a5a 100644 --- a/public/views/tab-home.html +++ b/public/views/tab-home.html @@ -47,11 +47,18 @@ -
+
+ ng-show="(!externalServices.AmazonGiftCards || !externalServices.BitpayCard || !externalServices.BuyAndSell) && nextStepEnabled">
Next steps
- - -
-
- Create a bitcoin wallet - -
From f867bfc268849275886ca69f998aed191af4289c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Fri, 30 Sep 2016 16:16:36 -0300 Subject: [PATCH 2/7] hide wallets preferences if no wallet --- public/views/tab-settings.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/views/tab-settings.html b/public/views/tab-settings.html index 0231d8d99..d2bb77e78 100644 --- a/public/views/tab-settings.html +++ b/public/views/tab-settings.html @@ -56,7 +56,7 @@
-
Wallets Preferences
+
Wallets Preferences
From fe9a2583cfe9bea11ff37cdb1102aad7e8165e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Fri, 30 Sep 2016 16:18:22 -0300 Subject: [PATCH 3/7] hide plus icon if no contacts in addressbook --- public/views/addressbook.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/views/addressbook.html b/public/views/addressbook.html index a6d355b6f..282118107 100644 --- a/public/views/addressbook.html +++ b/public/views/addressbook.html @@ -6,7 +6,7 @@ Addressbook - From c9edd53bb71ef4bbbeaf30320af95a89f08d7687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Fri, 30 Sep 2016 16:35:18 -0300 Subject: [PATCH 4/7] hide next steps --- public/views/tab-home.html | 2 +- src/js/controllers/tab-home.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/views/tab-home.html b/public/views/tab-home.html index 3cfdb0a5a..82a945170 100644 --- a/public/views/tab-home.html +++ b/public/views/tab-home.html @@ -123,7 +123,7 @@
+ ng-show="nextStepEnabled"> -
+
Buy & Sell Bitcoin @@ -112,7 +112,7 @@ -->
-
+
+ ng-show="nextStepEnabled && wallets[0]">
Next steps From e55054ad78a5fdfb79087fc7f8dd9508247be94a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Fri, 30 Sep 2016 17:00:45 -0300 Subject: [PATCH 7/7] refactor --- src/js/controllers/tab-home.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 83796a6d7..e13111622 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -218,11 +218,17 @@ angular.module('copayApp.controllers').controller('tabHomeController', configService.whenAvailable(function() { var config = configService.getSync(); var isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova; + $scope.glideraEnabled = config.glidera.enabled && !isWindowsPhoneApp; $scope.coinbaseEnabled = config.coinbase.enabled && !isWindowsPhoneApp; $scope.amazonEnabled = config.amazon.enabled; $scope.bitpayCardEnabled = config.bitpayCard.enabled; - $scope.nextStepEnabled = ($scope.glideraEnabled && !$scope.externalServices.BuyAndSell) || ($scope.coinbaseEnabled && !$scope.externalServices.BuyAndSell) || ($scope.amazonEnabled && !$scope.externalServices.AmazonGiftCards) || ($scope.bitpayCardEnabled && !$scope.externalServices.BitpayCard); + + var buyAndSellEnabled = !$scope.externalServices.BuyAndSell && ($scope.glideraEnabled || $scope.coinbaseEnabled); + var amazonEnabled = !$scope.externalServices.AmazonGiftCards && $scope.amazonEnabled; + var bitpayCardEnabled = !$scope.externalServices.BitpayCard && $scope.bitpayCardEnabled; + + $scope.nextStepEnabled = buyAndSellEnabled || amazonEnabled || bitpayCardEnabled; $scope.recentTransactionsEnabled = config.recentTransactions.enabled; if ($scope.bitpayCardEnabled) bitpayCardCache();