diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index 5fb0b3ca2..4ce4c86b7 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -241,6 +241,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( }); $scope.showWalletSelector = function() { + $scope.walletSelectorTitle = !$scope.isGlidera && !$scope.buyGlidera ? 'Send From' : 'Receive in'; if (!$scope.useSendMax && ($scope.insufficientFunds || $scope.noMatchingWallet)) return; $scope.showWallets = true; }; diff --git a/src/js/directives/clickToAccept.js b/src/js/directives/clickToAccept.js index 36cfbaeb5..63257e235 100644 --- a/src/js/directives/clickToAccept.js +++ b/src/js/directives/clickToAccept.js @@ -8,10 +8,11 @@ angular.module('copayApp.directives') transclude: true, scope: { sendStatus: '=clickSendStatus', + wallet: '=hasWalletChosen' }, link: function(scope, element, attrs) { scope.$watch('sendStatus', function() { - if(scope.sendStatus !== 'success') { + if (scope.sendStatus !== 'success') { scope.displaySendStatus = scope.sendStatus; } }); diff --git a/src/js/directives/slideToAccept.js b/src/js/directives/slideToAccept.js index a396e2b0d..e57aaecff 100644 --- a/src/js/directives/slideToAccept.js +++ b/src/js/directives/slideToAccept.js @@ -8,7 +8,8 @@ angular.module('copayApp.directives') transclude: true, scope: { sendStatus: '=slideSendStatus', - onConfirm: '&slideOnConfirm' + onConfirm: '&slideOnConfirm', + wallet: '=hasWalletChosen' }, link: function(scope, element, attrs) { @@ -33,9 +34,9 @@ angular.module('copayApp.directives') scope.displaySendStatus = ''; scope.$watch('sendStatus', function() { - if(!scope.sendStatus) { + if (!scope.sendStatus) { reset(); - } else if(scope.sendStatus === 'success') { + } else if (scope.sendStatus === 'success') { scope.displaySendStatus = ''; $timeout(function() { reset(); @@ -51,19 +52,20 @@ angular.module('copayApp.directives') var startTime = currentEaseStartTime; var initialPct = fromPct; var distance = pct - fromPct; + function ease() { - if(startTime !== currentEaseStartTime) { + if (startTime !== currentEaseStartTime) { return; } $window.requestAnimationFrame(function() { var now = Date.now(); var elapsed = now - startTime; - var normalizedElapsedTime = elapsed/duration; + var normalizedElapsedTime = elapsed / duration; var newVal = easeFx(normalizedElapsedTime); - var newPct = newVal*distance + initialPct; + var newPct = newVal * distance + initialPct; animateFx(newPct); scope.$digest(); - if(elapsed < duration) { + if (elapsed < duration) { ease(); } else { deferred.resolve(); @@ -93,31 +95,33 @@ angular.module('copayApp.directives') function setNewSliderStyle(pct) { var knobWidthPct = getKnobWidthPercentage(); var translatePct = pct - knobWidthPct; - if(isSliding) { - translatePct += 0.35*pct; + if (isSliding) { + translatePct += 0.35 * pct; } scope.sliderStyle = getTransformStyle(translatePct); curSliderPct = pct; } function setNewBitcoinStyle(pct) { - var translatePct = -2.25*pct; + var translatePct = -2.25 * pct; scope.bitcoinStyle = getTransformStyle(translatePct); curBitcoinPct = pct; } function setNewTextStyle(pct) { - var translatePct = -0.1*pct; + var translatePct = -0.1 * pct; scope.textStyle = getTransformStyle(translatePct); curTextPct = pct; } function getTransformStyle(translatePct) { - return {'transform': 'translateX(' + translatePct + '%)'}; + return { + 'transform': 'translateX(' + translatePct + '%)' + }; } - function getKnobWidthPercentage() { - var knobWidthPct = (KNOB_WIDTH/elm.clientWidth)*100; + function getKnobWidthPercentage() { + var knobWidthPct = (KNOB_WIDTH / elm.clientWidth) * 100; return knobWidthPct; } @@ -175,8 +179,8 @@ angular.module('copayApp.directives') function getTouchXPosition($event) { var x; - if($event.touches || $event.changedTouches) { - if($event.touches.length) { + if ($event.touches || $event.changedTouches) { + if ($event.touches.length) { x = $event.touches[0].clientX; } else { x = $event.changedTouches[0].clientX; @@ -190,18 +194,18 @@ angular.module('copayApp.directives') function getSlidPercentage($event) { var x = getTouchXPosition($event); var width = elm.clientWidth; - var pct = (x/width)*100; - if(x >= width) { + var pct = (x / width) * 100; + if (x >= width) { pct = 100; } return pct; } scope.onTouchstart = function($event) { - if(scope.isSlidFully) { + if (scope.isSlidFully) { return; } - if(!isSliding) { + if (!isSliding) { var pct = getSlidPercentage($event); if (pct > MAX_SLIDE_START_PERCENTAGE) { jiggleSlider(); @@ -209,7 +213,7 @@ angular.module('copayApp.directives') } else { isSliding = true; var knobWidthPct = getKnobWidthPercentage(); - if(pct < knobWidthPct) { + if (pct < knobWidthPct) { pct = knobWidthPct; } pct += PERCENTAGE_BUMP; @@ -219,12 +223,12 @@ angular.module('copayApp.directives') }; scope.onTouchmove = function($event) { - if(!isSliding || scope.isSlidFully) { + if (!isSliding || scope.isSlidFully) { return; } var pct = getSlidPercentage($event); var knobWidthPct = getKnobWidthPercentage(); - if(pct < knobWidthPct) { + if (pct < knobWidthPct) { pct = knobWidthPct; } pct += PERCENTAGE_BUMP; @@ -233,11 +237,11 @@ angular.module('copayApp.directives') }; scope.onTouchend = function($event) { - if(scope.isSlidFully) { + if (scope.isSlidFully) { return; } var pct = getSlidPercentage($event); - if(isSliding && pct > FULLY_SLID_PERCENTAGE) { + if (isSliding && pct > FULLY_SLID_PERCENTAGE) { pct = 100; setSliderPosition(pct); alertSlidFully(); diff --git a/src/js/directives/walletSelector.js b/src/js/directives/walletSelector.js index 97149d528..c5dfff59a 100644 --- a/src/js/directives/walletSelector.js +++ b/src/js/directives/walletSelector.js @@ -7,6 +7,7 @@ angular.module('copayApp.directives') templateUrl: 'views/includes/walletSelector.html', transclude: true, scope: { + title: '=walletSelectorTitle', show: '=walletSelectorShow', wallets: '=walletSelectorWallets', selectedWallet: '=walletSelectorSelectedWallet', diff --git a/src/sass/views/amount.scss b/src/sass/views/amount.scss index 1c40612cc..cc4bf24e3 100644 --- a/src/sass/views/amount.scss +++ b/src/sass/views/amount.scss @@ -85,8 +85,9 @@ color: $dark-gray; font-weight: bold; .limits { - margin-top: 20px; + margin-top: 10px; color: $light-gray; + font-size: 12px; } } } diff --git a/src/sass/views/includes/txp-details.scss b/src/sass/views/includes/txp-details.scss index 98a512fe0..7cc44a655 100644 --- a/src/sass/views/includes/txp-details.scss +++ b/src/sass/views/includes/txp-details.scss @@ -47,22 +47,6 @@ color: #9B9B9B; } } - .glidera-explanation { - padding: 0 1rem; - margin: 1rem 0; - white-space: normal; - } - .glidera-description { - text-align: center; - font-size: 15px; - color: $mid-gray; - margin: 1rem 0; - a { - font-weight: bold; - cursor: pointer; - cursor: hand; - } - } } .item { border-color: $item-border-color; @@ -261,7 +245,6 @@ color: rgba(58, 58, 58, .6); margin-bottom: 1.5rem; } - .glidera-success { margin-top: 15px; span { @@ -269,4 +252,13 @@ display: block; } } + .glidera-explanation { + padding: 0 1rem; + white-space: normal; + } + .glidera-description { + text-align: center; + font-size: 12px; + color: $mid-gray; + } } diff --git a/www/views/confirm.html b/www/views/confirm.html index 3d8172fa6..fa3fd059b 100644 --- a/www/views/confirm.html +++ b/www/views/confirm.html @@ -12,26 +12,14 @@
- Sending + Sending Sending maximum amount + Buying
{{displayAmount || '...'}} {{displayUnit}}
{{alternativeAmountStr || '...'}}
-
-
-
- Buy {{buyPrice.subtotal|currency:'':2}} {{buyPrice.currency}} in Bitcoin at {{buyPrice.price}} {{buyPrice.currency}}/BTC -
-
- Fiat will be immediately withdrawn from your bank account -
-
- Each bitcoin wallet can generate billions of addresses from your 12-word backup. A new address is automatically generated and shown each time your recive a payment -
-
-
@@ -40,7 +28,8 @@ Expired
- To + To + From @@ -65,7 +54,8 @@
- From + From + To
@@ -87,6 +77,20 @@ {{fee || '...'}}
+
+ Information +
+
+ Buy {{buyPrice.subtotal|currency:'':2}} {{buyPrice.currency}} in Bitcoin at {{buyPrice.price}} {{buyPrice.currency}}/BTC +
+
+ Fiat will be immediately withdrawn from your bank account. +
+
+ The bitcoins will be purchased and deposited to "{{wallet.name || '...' }}" wallet in 2-4 business days. +
+
+
No wallets available
@@ -97,15 +101,18 @@
+ click-send-status="sendStatus" + has-wallet-chosen="wallet"> Click to pay + slide-on-confirm="wallet ? onConfirm() : null" + slide-send-status="sendStatus" + has-wallet-chosen="wallet"> Slide to pay +