buy flow rename and fixes
This commit is contained in:
parent
f60ee6f4fd
commit
a76dfb110d
10 changed files with 75 additions and 67 deletions
|
|
@ -241,6 +241,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.showWalletSelector = function() {
|
$scope.showWalletSelector = function() {
|
||||||
|
$scope.walletSelectorTitle = !$scope.isGlidera && !$scope.buyGlidera ? 'Send From' : 'Receive in';
|
||||||
if (!$scope.useSendMax && ($scope.insufficientFunds || $scope.noMatchingWallet)) return;
|
if (!$scope.useSendMax && ($scope.insufficientFunds || $scope.noMatchingWallet)) return;
|
||||||
$scope.showWallets = true;
|
$scope.showWallets = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ angular.module('copayApp.directives')
|
||||||
transclude: true,
|
transclude: true,
|
||||||
scope: {
|
scope: {
|
||||||
sendStatus: '=clickSendStatus',
|
sendStatus: '=clickSendStatus',
|
||||||
|
wallet: '=hasWalletChosen'
|
||||||
},
|
},
|
||||||
link: function(scope, element, attrs) {
|
link: function(scope, element, attrs) {
|
||||||
scope.$watch('sendStatus', function() {
|
scope.$watch('sendStatus', function() {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ angular.module('copayApp.directives')
|
||||||
transclude: true,
|
transclude: true,
|
||||||
scope: {
|
scope: {
|
||||||
sendStatus: '=slideSendStatus',
|
sendStatus: '=slideSendStatus',
|
||||||
onConfirm: '&slideOnConfirm'
|
onConfirm: '&slideOnConfirm',
|
||||||
|
wallet: '=hasWalletChosen'
|
||||||
},
|
},
|
||||||
link: function(scope, element, attrs) {
|
link: function(scope, element, attrs) {
|
||||||
|
|
||||||
|
|
@ -51,6 +52,7 @@ angular.module('copayApp.directives')
|
||||||
var startTime = currentEaseStartTime;
|
var startTime = currentEaseStartTime;
|
||||||
var initialPct = fromPct;
|
var initialPct = fromPct;
|
||||||
var distance = pct - fromPct;
|
var distance = pct - fromPct;
|
||||||
|
|
||||||
function ease() {
|
function ease() {
|
||||||
if (startTime !== currentEaseStartTime) {
|
if (startTime !== currentEaseStartTime) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -113,7 +115,9 @@ angular.module('copayApp.directives')
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTransformStyle(translatePct) {
|
function getTransformStyle(translatePct) {
|
||||||
return {'transform': 'translateX(' + translatePct + '%)'};
|
return {
|
||||||
|
'transform': 'translateX(' + translatePct + '%)'
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function getKnobWidthPercentage() {
|
function getKnobWidthPercentage() {
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ angular.module('copayApp.directives')
|
||||||
templateUrl: 'views/includes/walletSelector.html',
|
templateUrl: 'views/includes/walletSelector.html',
|
||||||
transclude: true,
|
transclude: true,
|
||||||
scope: {
|
scope: {
|
||||||
|
title: '=walletSelectorTitle',
|
||||||
show: '=walletSelectorShow',
|
show: '=walletSelectorShow',
|
||||||
wallets: '=walletSelectorWallets',
|
wallets: '=walletSelectorWallets',
|
||||||
selectedWallet: '=walletSelectorSelectedWallet',
|
selectedWallet: '=walletSelectorSelectedWallet',
|
||||||
|
|
|
||||||
|
|
@ -85,8 +85,9 @@
|
||||||
color: $dark-gray;
|
color: $dark-gray;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
.limits {
|
.limits {
|
||||||
margin-top: 20px;
|
margin-top: 10px;
|
||||||
color: $light-gray;
|
color: $light-gray;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,22 +47,6 @@
|
||||||
color: #9B9B9B;
|
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 {
|
.item {
|
||||||
border-color: $item-border-color;
|
border-color: $item-border-color;
|
||||||
|
|
@ -261,7 +245,6 @@
|
||||||
color: rgba(58, 58, 58, .6);
|
color: rgba(58, 58, 58, .6);
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.glidera-success {
|
.glidera-success {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
span {
|
span {
|
||||||
|
|
@ -269,4 +252,13 @@
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.glidera-explanation {
|
||||||
|
padding: 0 1rem;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
.glidera-description {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
color: $mid-gray;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,26 +12,14 @@
|
||||||
<div class="item head">
|
<div class="item head">
|
||||||
<div class="sending-label">
|
<div class="sending-label">
|
||||||
<img src="img/icon-tx-sent-outline.svg">
|
<img src="img/icon-tx-sent-outline.svg">
|
||||||
<span translate ng-if="!useSendMax">Sending</span>
|
<span translate ng-if="!useSendMax && !isGlidera">Sending</span>
|
||||||
<span translate ng-if="useSendMax">Sending maximum amount</span>
|
<span translate ng-if="useSendMax">Sending maximum amount</span>
|
||||||
|
<span ng-if="isGlidera && glideraBuy">Buying</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="amount-label">
|
<div class="amount-label">
|
||||||
<div class="amount">{{displayAmount || '...'}} <span class="unit">{{displayUnit}}</span></div>
|
<div class="amount">{{displayAmount || '...'}} <span class="unit">{{displayUnit}}</span></div>
|
||||||
<div class="alternative">{{alternativeAmountStr || '...'}}</div>
|
<div class="alternative">{{alternativeAmountStr || '...'}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-show="isGlidera">
|
|
||||||
<div class="glidera-explanation">
|
|
||||||
<div class="glidera-description" ng-show="buyPrice.qty">
|
|
||||||
Buy {{buyPrice.subtotal|currency:'':2}} {{buyPrice.currency}} in Bitcoin at {{buyPrice.price}} {{buyPrice.currency}}/BTC
|
|
||||||
</div>
|
|
||||||
<div class="glidera-description">
|
|
||||||
Fiat will be immediately withdrawn from your bank account
|
|
||||||
</div>
|
|
||||||
<div class="glidera-description">
|
|
||||||
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
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="item single-line" ng-if="paypro">
|
<div class="item single-line" ng-if="paypro">
|
||||||
|
|
@ -40,7 +28,8 @@
|
||||||
<span class="item-note" ng-if="paymentExpired.value" ng-style="{'color': 'red'}" translate>Expired</span>
|
<span class="item-note" ng-if="paymentExpired.value" ng-style="{'color': 'red'}" translate>Expired</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class="label" translate>To</span>
|
<span class="label" ng-if="!isGlidera" translate>To</span>
|
||||||
|
<span class="label" ng-if="isGlidera && glideraBuy">From</span>
|
||||||
<span class="payment-proposal-to">
|
<span class="payment-proposal-to">
|
||||||
<img ng-if="!cardId && !isGiftCard && !isGlidera" src="img/icon-bitcoin-small.svg">
|
<img ng-if="!cardId && !isGiftCard && !isGlidera" src="img/icon-bitcoin-small.svg">
|
||||||
<img ng-if="cardId" src="img/icon-card.svg" width="34">
|
<img ng-if="cardId" src="img/icon-card.svg" width="34">
|
||||||
|
|
@ -65,7 +54,8 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a class="item item-icon-right" ng-hide="!useSendMax && (insufficientFunds || noMatchingWallet)" ng-click="showWalletSelector()">
|
<a class="item item-icon-right" ng-hide="!useSendMax && (insufficientFunds || noMatchingWallet)" ng-click="showWalletSelector()">
|
||||||
<span class="label" translate>From</span>
|
<span class="label" ng-if="!isGlidera" translate>From</span>
|
||||||
|
<span class="label" ng-if="isGlidera && glideraBuy" translate>To</span>
|
||||||
<div class="wallet">
|
<div class="wallet">
|
||||||
<i class="icon big-icon-svg">
|
<i class="icon big-icon-svg">
|
||||||
<img src="img/icon-wallet.svg" ng-style="{'background-color': wallet.color}" class="bg"/>
|
<img src="img/icon-wallet.svg" ng-style="{'background-color': wallet.color}" class="bg"/>
|
||||||
|
|
@ -87,6 +77,20 @@
|
||||||
{{fee || '...'}}
|
{{fee || '...'}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="item" ng-show="isGlidera">
|
||||||
|
<span class="label">Information</span>
|
||||||
|
<div class="glidera-explanation">
|
||||||
|
<div class="glidera-description" ng-show="buyPrice.qty">
|
||||||
|
Buy {{buyPrice.subtotal|currency:'':2}} {{buyPrice.currency}} in Bitcoin at {{buyPrice.price}} {{buyPrice.currency}}/BTC
|
||||||
|
</div>
|
||||||
|
<div class="glidera-description">
|
||||||
|
Fiat will be immediately withdrawn from your bank account.
|
||||||
|
</div>
|
||||||
|
<div class="glidera-description">
|
||||||
|
The bitcoins will be purchased and deposited to "{{wallet.name || '...' }}" wallet in 2-4 business days.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="text-center" ng-show="noMatchingWallet">
|
<div class="text-center" ng-show="noMatchingWallet">
|
||||||
<span class="badge badge-energized" translate>No wallets available</span>
|
<span class="badge badge-energized" translate>No wallets available</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -97,15 +101,18 @@
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
<click-to-accept
|
<click-to-accept
|
||||||
ng-click="approve(statusChangeHandler)"
|
ng-click="wallet ? approve(statusChangeHandler) : null"
|
||||||
ng-if="!isCordova && wallets[0] && !insufficientFunds && !noMatchingWallet"
|
ng-if="!isCordova && wallets[0] && !insufficientFunds && !noMatchingWallet"
|
||||||
click-send-status="sendStatus">
|
click-send-status="sendStatus"
|
||||||
|
has-wallet-chosen="wallet">
|
||||||
Click to pay
|
Click to pay
|
||||||
</click-to-accept>
|
</click-to-accept>
|
||||||
<slide-to-accept
|
<slide-to-accept
|
||||||
|
ng-disabled="!wallet"
|
||||||
ng-if="isCordova && wallets[0] && !insufficientFunds && !noMatchingWallet"
|
ng-if="isCordova && wallets[0] && !insufficientFunds && !noMatchingWallet"
|
||||||
slide-on-confirm="onConfirm()"
|
slide-on-confirm="wallet ? onConfirm() : null"
|
||||||
slide-send-status="sendStatus">
|
slide-send-status="sendStatus"
|
||||||
|
has-wallet-chosen="wallet">
|
||||||
Slide to pay
|
Slide to pay
|
||||||
</slide-to-accept>
|
</slide-to-accept>
|
||||||
<slide-to-accept-success
|
<slide-to-accept-success
|
||||||
|
|
@ -121,6 +128,7 @@
|
||||||
</slide-to-accept-success>
|
</slide-to-accept-success>
|
||||||
|
|
||||||
<wallet-selector
|
<wallet-selector
|
||||||
|
wallet-selector-title="walletSelectorTitle"
|
||||||
wallet-selector-wallets="wallets"
|
wallet-selector-wallets="wallets"
|
||||||
wallet-selector-selected-wallet="wallet"
|
wallet-selector-selected-wallet="wallet"
|
||||||
wallet-selector-show="showWallets"
|
wallet-selector-show="showWallets"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<button class="click-to-accept__button button button-standard button-primary" ng-class="{disable: sendStatus}">
|
<button ng-disabled="!wallet" class="click-to-accept__button button button-standard button-primary" ng-class="{disable: sendStatus}">
|
||||||
<span ng-if="!sendStatus">
|
<span ng-if="!sendStatus">
|
||||||
<ng-transclude></ng-transclude>
|
<ng-transclude></ng-transclude>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
ng-class="{'fill-screen': fillScreen}">
|
ng-class="{'fill-screen': fillScreen}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="slide-success__content">
|
<div ng-disabled="wallet" class="slide-success__content">
|
||||||
<img src="img/onboarding-success.svg" ng-class="{reveal: fillScreen}">
|
<img src="img/onboarding-success.svg" ng-class="{reveal: fillScreen}">
|
||||||
<div class="slide-success__content__header" ng-class="{reveal: fillScreen}">
|
<div class="slide-success__content__header" ng-class="{reveal: fillScreen}">
|
||||||
<ng-transclude>Payment Sent</ng-transclude>
|
<ng-transclude>Payment Sent</ng-transclude>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<action-sheet action-sheet-show="show" class="wallet-selector">
|
<action-sheet action-sheet-show="show" class="wallet-selector">
|
||||||
<img class="back-arrow" src="img/icon-back-arrow.svg" ng-click="hide()">
|
<img class="back-arrow" src="img/icon-back-arrow.svg" ng-click="hide()">
|
||||||
<div class="header">Send from</div>
|
<div class="header">{{title}}</div>
|
||||||
<a
|
<a
|
||||||
ng-repeat="w in wallets track by $index"
|
ng-repeat="w in wallets track by $index"
|
||||||
class="item item-icon-left item-big-icon-left item-icon-right wallet"
|
class="item item-icon-left item-big-icon-left item-icon-right wallet"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue