diff --git a/src/js/controllers/modals/walletBalance.js b/src/js/controllers/modals/walletBalance.js deleted file mode 100644 index 37d38d5ce..000000000 --- a/src/js/controllers/modals/walletBalance.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('walletBalanceController', function($scope) { - - $scope.close = function() { - $scope.walletBalanceModal.hide(); - }; - -}); diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index aa905eed1..bf24645b2 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -114,6 +114,10 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.walletBalanceModal = modal; $scope.walletBalanceModal.show(); }); + + $scope.close = function() { + $scope.walletBalanceModal.hide(); + }; }; $scope.recreate = function() { @@ -243,11 +247,10 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun }; var prevPos; - var screenInactive = true; function getScrollPosition() { var scrollPosition = $ionicScrollDelegate.getScrollPosition(); - if (!scrollPosition || screenInactive) { + if (!scrollPosition) { $window.requestAnimationFrame(function() { getScrollPosition(); }); @@ -280,11 +283,31 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun var s = amountScale; + // Make space for the balance button when it needs to display. + var TOP_NO_BALANCE_BUTTON = 45; + var TOP_BALANCE_BUTTON = 10; + var top = TOP_NO_BALANCE_BUTTON; + $scope.showBalanceButton = ($scope.wallet.status.totalBalanceSat != $scope.wallet.status.spendableAmount); + if ($scope.showBalanceButton) { + top = TOP_BALANCE_BUTTON; + $scope.showBalanceButton = true; + } + + var amountTop = ((amountScale - 0.5) / 0.5) * top; + if (amountTop < 5) { + amountTop = 5; + } + if (amountTop > top) { + amountTop = top; + } + + var t = amountTop; + $scope.altAmountOpacity = (amountHeight - 100) / 80; $window.requestAnimationFrame(function() { $scope.amountHeight = amountHeight + 'px'; $scope.contentMargin = contentMargin + 'px'; - $scope.amountScale = 'scale3d(' + s + ',' + s + ',' + s + ')'; + $scope.amountScale = 'scale3d(' + s + ',' + s + ',' + s + ') translateY(' + t + 'px)'; $scope.$digest(); getScrollPosition(); }); @@ -294,16 +317,10 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.$on("$ionicView.enter", function(event, data) { setAndroidStatusBarColor(); - $timeout(function() { - screenInactive = false; - }, 200); if (scrollWatcherInitialized || !$scope.amountIsCollapsible) { return; } scrollWatcherInitialized = true; - $timeout(function() { - getScrollPosition(); - }, 100); }); $scope.$on("$ionicView.beforeEnter", function(event, data) { @@ -317,6 +334,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun }); $scope.updateAll(); + getScrollPosition(); listeners = [ $rootScope.$on('bwsEvent', function(e, walletId) { @@ -337,7 +355,6 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun }); $scope.$on("$ionicView.leave", function(event, data) { - screenInactive = true; lodash.each(listeners, function(x) { x(); }); diff --git a/src/sass/views/tab-home.scss b/src/sass/views/tab-home.scss index fa6356347..3f1f9a911 100644 --- a/src/sass/views/tab-home.scss +++ b/src/sass/views/tab-home.scss @@ -111,10 +111,10 @@ font-weight: 300; color: $light-gray; } - &__icon { - width: 15px; + &__status-icon { + font-size: 18px; position: relative; - top: 3px; + top: 1px; color: $light-gray; } } diff --git a/src/sass/views/walletBalance.scss b/src/sass/views/walletBalance.scss index f9502c750..7dffa0f8b 100644 --- a/src/sass/views/walletBalance.scss +++ b/src/sass/views/walletBalance.scss @@ -4,17 +4,28 @@ font-size: 16px; - &--available { + &--total { color: $mid-gray; font-weight: bold; } + &--available { + color: #09C286;; + font-weight: bold; + } + &--confirming { - color: #09C286; + color: #FF9900; + font-weight: bold; } &--locked { - color: $dark-gray; + color: #FF9900; + font-weight: bold; + } + + &--alternative { + color: $light-gray; } } @@ -74,18 +85,29 @@ &__heading { font-size: 17px; color: #445; - margin: 1rem 1rem 0 1rem; + margin: 1rem 1rem 1rem 1rem; } &__description { - font-size: 15px; + font-size: 12.5px; color: #667; - margin: 1rem; + margin: 0.7rem; + line-height: 16px; } } #wallet-balance { + .bar-header { + border: 0; + background: none; + .title, .button { + color: #fff; + } + .button { + background-color: transparent; + } + } ion-content { background: #F5F5F5; diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index 83a980538..b556f5549 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -130,7 +130,7 @@ ion-content { &.collapsible { - margin-top: 180px; + margin-top: 210px; } padding-top: 0; @@ -179,8 +179,7 @@ } &__balance { - transform: scale3d(1, 1, 1); - margin-top: 5px; + transform: scale3d(1, 1, 1) translateY(45px); } &__updating { @@ -196,14 +195,11 @@ line-height: 100%; } - &__top { - margin-top: 45px; - } - &__button-balance { background-color: transparent; border: 1px solid rgba(255,255,255,0.25); } + } .item.item-footer { font-weight: lighter; diff --git a/www/img/icon-confirming-clear.svg b/www/img/icon-confirming-clear.svg new file mode 100644 index 000000000..e7cf58529 --- /dev/null +++ b/www/img/icon-confirming-clear.svg @@ -0,0 +1,18 @@ + + + + +Group 2 +Created with Sketch. + + + + + + + + + diff --git a/www/views/modals/wallet-balance.html b/www/views/modals/wallet-balance.html index 8d147df97..98474578b 100644 --- a/www/views/modals/wallet-balance.html +++ b/www/views/modals/wallet-balance.html @@ -1,22 +1,28 @@ - - + +
- Balance + {{wallet.name}}
+
+ + + +
All of your bitcoin wallet balance may not be available for immediate spending.
-
Total is the total amount of bitcoin stored in this wallet. It is the sum of Available, Confirming, and Locked balances.
- +
Total
- + {{status.totalBalanceStr}}
@@ -27,7 +33,7 @@
-
Available is the immediatley spendable amount of bitcoin stored in this wallet. It is the Total less Confirming and Locked balances. If you have enabled Use Unconfirmed Funds setting then the Available amount is the Total less Locked balance.
+
Total is the total amount of bitcoin stored in this wallet. It is the sum of Available, Confirming, and Locked amounts.
@@ -44,13 +50,13 @@
-
Confirming is the amount of bitcoin stored in this wallet with fewer than 3 block chain confirmations.
+
Available is the immediatley spendable amount of bitcoin stored in this wallet. It is the Total less Confirming and Locked amounts. If you have enabled Use Unconfirmed Funds setting then the Available amount is the Total less Locked amount.
- +
Confirming
- + {{status.pendingBalanceStr}}
@@ -61,13 +67,13 @@
-
Locked is the amount of bitcoin stored in this wallet that is allocated as inputs to pending transaction proposals. This amount is determined using unspent transaction outputs associated with the wallet and may be more than the actual amounts associated with your pending transaction proposals.
+
Confirming is the amount of bitcoin stored in this wallet with fewer than 6 block chain confirmations.
- +
Locked
- + {{status.lockedBalanceStr}}
@@ -78,6 +84,7 @@
+
Locked is the amount of bitcoin stored in this wallet that is allocated as inputs to pending transaction proposals. This amount is determined using unspent transaction outputs associated with the wallet and may be more than the actual amounts associated with your pending transaction proposals.
diff --git a/www/views/tab-home.html b/www/views/tab-home.html index e7dc6d0bc..e648d02e7 100644 --- a/www/views/tab-home.html +++ b/www/views/tab-home.html @@ -80,8 +80,9 @@ Incomplete - {{wallet.status.totalBalanceStr}} - + {{wallet.status.totalBalanceStr}} + + [Balance Hidden] {{wallet.m}}-of-{{wallet.n}} diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index 3400baf78..59c265045 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -27,11 +27,12 @@
+ {{updateStatusError}} Tap to retry
- This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information. + This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information. Recreate
@@ -45,8 +46,7 @@ ng-show="!updateStatusError && wallet.walletScanStatus != 'error' && !wallet.balanceHidden" on-hold="hideToggle()" ng-style="{'transform': amountScale}" - class="amount__balance" - ng-class="{'amount__top': status.totalBalanceSat == status.spendableAmount}"> + class="amount__balance"> {{status.totalBalanceStr}}
+
-
+ +
+
@@ -110,12 +113,12 @@
- {{updateStatusError}} + {{updateStatusError}} Tap to retry
- This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information. + This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information. Recreate