diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index a04820ebd..07b01b974 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -224,6 +224,7 @@ angular.module('copayApp.controllers').controller('tabHomeController', cb(); } } + $scope.walletsWithFunds = profileService.getWallets({hasFunds: true}); }); }); }; diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index 29acb10d8..0de417bf9 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -233,10 +233,14 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi if (!$scope.wallets[0]) return; - // select first wallet if no wallet selected previously - var selectedWallet = checkSelectedWallet($scope.wallet, $scope.wallets); + var selectedWallet = null; + if (data.stateParams.walletId) { // from walletDetails + selectedWallet = checkSelectedWallet(profileService.getWallet(data.stateParams.walletId), $scope.wallets); + } else { + // select first wallet if no wallet selected previously + selectedWallet = checkSelectedWallet($scope.wallet, $scope.wallets); + } $scope.onWalletSelect(selectedWallet); - $scope.showShareButton = platformInfo.isCordova ? (platformInfo.isIOS ? 'iOS' : 'Android') : null; listeners = [ diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index 241bbce89..d3308ff1e 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -342,9 +342,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun top = TOP_BALANCE_BUTTON; } - var amountTop = ((amountScale - 0.7) / 0.7) * top; - if (amountTop < -10) { - amountTop = -10; + var amountTop = ((amountScale - 0.80) / 0.80) * top; + if (amountTop < -2) { + amountTop = -2; } if (amountTop > top) { amountTop = top; @@ -353,6 +353,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun var t = amountTop; $scope.altAmountOpacity = (amountHeight - 100) / 80; + $scope.buttonsOpacity = (amountHeight - 140) / 70; $window.requestAnimationFrame(function() { $scope.amountHeight = amountHeight + 'px'; $scope.contentMargin = contentMargin + 'px'; @@ -469,4 +470,30 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun function rgbToHex(r, g, b) { return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b); } + $scope.goToSend = function() { + $state.go('tabs.home', { + walletId: $scope.wallet.id + }).then(function () { + $ionicHistory.clearHistory(); + $state.go('tabs.send'); + }); + }; + $scope.goToReceive = function() { + $state.go('tabs.home', { + walletId: $scope.wallet.id + }).then(function () { + $ionicHistory.clearHistory(); + $state.go('tabs.receive', { + walletId: $scope.wallet.id + }); + }); + }; + $scope.goToBuy = function() { + $state.go('tabs.home', { + walletId: $scope.wallet.id + }).then(function () { + $ionicHistory.clearHistory(); + $state.go('tabs.buyandsell'); + }); + }; }); diff --git a/src/js/routes.js b/src/js/routes.js index 665294b9b..d1b67e575 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -236,7 +236,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('tabs.receive', { - url: '/receive', + url: '/receive/:walletId', views: { 'tab-receive': { controller: 'tabReceiveController', diff --git a/src/sass/buttons.scss b/src/sass/buttons.scss index a8512ae64..ab066b734 100644 --- a/src/sass/buttons.scss +++ b/src/sass/buttons.scss @@ -72,5 +72,17 @@ &.activated { color: #FFF; } + &-outline { + @include button-style(transparent, #FFFFFF, #FAFAFA, #FFF, #FFFFFF); + @include button-outline(#FFFFFF); + background: none; + box-shadow: none; + } + } + &-grey-outline { + @include button-style(transparent, #727272, #FAFAFA, #727272, #727272); + @include button-outline(#727272); + background: none; + box-shadow: none; } } \ No newline at end of file diff --git a/src/sass/shame.scss b/src/sass/shame.scss index 07ac2dedf..5a17c5f1f 100644 --- a/src/sass/shame.scss +++ b/src/sass/shame.scss @@ -233,6 +233,10 @@ input[type=number] { font-size: 24px; } +.size-25 { + font-size: 25px; +} + .size-28 { font-size: 28px; } diff --git a/src/sass/views/tab-home.scss b/src/sass/views/tab-home.scss index 66a2f1d58..708ff4fad 100644 --- a/src/sass/views/tab-home.scss +++ b/src/sass/views/tab-home.scss @@ -69,6 +69,25 @@ } } } + .buttons { + margin: 6px auto -12px; + max-width: 600px; + >.col { + padding: 5px 10px; + margin-bottom: 0; + } + .button { + border: 2px solid; + border-radius: 47px; + padding: 0 15px 0 15px; + text-align: center; + width: 100%; + font-size: 19px; + font-weight: bolder; + min-height: auto; + line-height: 36px; + } + } .wallet-coin-logo { vertical-align: middle; margin-right: 5px; diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index 9e651f871..6b760bbc4 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -135,11 +135,12 @@ &.status-bar { margin-top: 20px; + margin-top: env(safe-area-inset-top); } } .bar-header { border: 0; - background: none; + background: rgb(238, 182, 64); .title, .button { color: #fff; } @@ -153,7 +154,7 @@ ion-content { &.collapsible { - margin-top: 210px; + margin-top: 230px; } padding-top: 0; @@ -190,12 +191,34 @@ transform: translateY(100px); } } + + .send-receive-buttons { + max-width: 600px; + position: absolute; + bottom: 20px; + + >.col { + padding: 5px 10px; + margin-bottom: 0; + } + .button { + border: 2px solid; + border-radius: 47px; + padding: 0 15px 0 15px; + text-align: center; + width: 100%; + font-size: 19px; + font-weight: bolder; + min-height: auto; + line-height: 36px; + } + } } .amount { width: 100%; text-align: center; color: #fff; - height: 210px; + height: 230px; padding-top: 40px; display: block; align-items: center; diff --git a/www/views/tab-home.html b/www/views/tab-home.html index 8df176a56..618f2e128 100644 --- a/www/views/tab-home.html +++ b/www/views/tab-home.html @@ -22,6 +22,24 @@ +
+
+
+ Receive +
+
+
+
+ Buy Bitcoin +
+
+ Send +
+
+
+
diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index 0f9e4961c..f9cf662cb 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -34,7 +34,7 @@ on-hold="hideToggle()" ng-style="{'transform': amountScale}" ng-class="{amount__balance: amountIsCollapsible}"> - {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} + {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
- {{status.totalBalanceStr}} + {{status.totalBalanceStr}}
+
+
+
+ Receive +
+
+
+
+ Buy Bitcoin +
+
+ Send +
+
+
+
@@ -127,7 +143,7 @@ on-hold="hideToggle()" ng-style="{'transform': amountScale}" ng-class="{amount__balance: amountIsCollapsible}"> - {{status.totalBalanceStr}} + {{status.totalBalanceStr}}
- {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} + {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
{{status.totalBalanceStr}} @@ -156,7 +172,7 @@ ng-show="!updateStatusError && wallet.balanceHidden && !wallet.scanning" on-hold="hideToggle()"> [Balance Hidden] -
+
Tap and hold to show
@@ -166,7 +182,7 @@ class="amount__balance" ng-show="!updateStatusError && wallet.scanning"> [Scanning Funds] -
+
Please wait
@@ -198,6 +214,22 @@
+
+
+
+ Receive +
+
+
+
+ Buy Bitcoin +
+
+ Send +
+
+
+