send working. Refactor paypro and payment intents
This commit is contained in:
parent
7f42d60d5d
commit
2fe6ec4c6a
21 changed files with 426 additions and 493 deletions
|
|
@ -1,6 +1,4 @@
|
|||
<div ng-controller="CopayersController">
|
||||
<div ng-if='$root.wallet && $root.wallet.isComplete()' ng-init="goToWallet()"></div>
|
||||
|
||||
<div class="row hide-for-large-up">
|
||||
<div class="medium-12 small-12 columns">
|
||||
<h1 translate>
|
||||
|
|
|
|||
28
views/modals/paypro.html
Normal file
28
views/modals/paypro.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<a class="close-reveal-modal" ng-click="cancel()">×</a>
|
||||
|
||||
<div class="size-14">
|
||||
<h1 class="m30v">Payment Protocol Request</h1>
|
||||
|
||||
<p>
|
||||
<b translate>Signature:</b>
|
||||
<span ng-show="!!$root.merchant.pr.ca"><i class="fi-lock green"></i> {{$root.merchant.pr.ca}}</span>
|
||||
<span ng-show="!$root.merchant.pr.ca"><i class="fi-unlock red"></i> Untrusted</span>
|
||||
<p>
|
||||
<b translate>Merchant Message:</b>
|
||||
{{$root.merchant.pr.pd.memo || address}}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b translate>Merchant Message:</b>
|
||||
<i>{{amount}} {{$root.wallet.settings.unitName}}</i>
|
||||
<span class="text-gray" ng-if="isRateAvailable">
|
||||
{{ alternative }} {{ alternativeIsoCode }}
|
||||
</span>
|
||||
<p ng-show="!!$root.merchant">
|
||||
Expires {{$root.merchant.expiration | amTimeAgo }} [{{$root.merchant.domain}}]
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
29
views/modals/walletSelection.html
Normal file
29
views/modals/walletSelection.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<a class="close-reveal-modal" ng-click="cancel()">×</a>
|
||||
|
||||
<h3>Select a wallet to make the payment</h3>
|
||||
<span ng-show="!wallets[0]">Loading...</span>
|
||||
<ul class="w-popup-menu" ng-show="wallets[0]" ng-class="{'large':wallets.length > 4, 'medium':wallets.length > 2 && wallets.length < 5}">
|
||||
<li data-ng-repeat="item in wallets track by $index" class="nav-item" ng-click="ok(item)">
|
||||
<div class="w-popup-icon">
|
||||
<div class="avatar-wallet">{{(item.name || item.id) | limitTo: 1}}</div>
|
||||
</div>
|
||||
<div class="w-popup-content">
|
||||
<div class="">
|
||||
<a class="size-12 wallet-item">
|
||||
<div class="">
|
||||
<div class="w-popup-main">[ {{item.requiredCopayers}} of {{item.totalCopayers}} ]</div>
|
||||
<div class="w-popup-sub size-18">{{item.name || item.id}}</div>
|
||||
</div>
|
||||
<div class="w-popup-sub">
|
||||
<span ng-if="item.balanceInfo.updatingBalance"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
|
||||
<div ng-if="!item.balanceInfo.updatingBalance" data-options="disable_for_touch:true">
|
||||
<b class="m5r size-12">{{item.balanceInfo.totalBalance || 0}} {{item.settings.unitName}}</b>
|
||||
<span class="alt-currency size-10">{{item.balanceInfo.totalBalanceAlternative}} {{item.balanceInfo.alternativeIsoCode}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
<div ng-controller="PaymentIntentController" ng-init="open()">
|
||||
<script type="text/ng-template" id="myModalContent.html">
|
||||
<h3>Select a wallet to make the payment</h3>
|
||||
<span ng-show="loading">Loading...</span>
|
||||
<ul class="w-popup-menu" ng-show="wallets[0]"
|
||||
ng-class="{'large':wallets.length > 4, 'medium':wallets.length > 2 && wallets.length < 5}">
|
||||
<li data-ng-repeat="item in wallets track by $index" class="nav-item" ng-click="ok(item)">
|
||||
<div class="w-popup-icon">
|
||||
<div class="avatar-wallet">{{(item.name || item.id) | limitTo: 1}}</div>
|
||||
</div>
|
||||
<div class="w-popup-content">
|
||||
<div class="">
|
||||
<a class="size-12 wallet-item">
|
||||
<div class="">
|
||||
<div class="w-popup-main">[ {{item.requiredCopayers}} of {{item.totalCopayers}} ]</div>
|
||||
<div class="w-popup-sub size-18">{{item.name || item.id}}</div>
|
||||
</div>
|
||||
<div class="w-popup-sub">
|
||||
<span ng-if="item.balanceInfo.updatingBalance"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
|
||||
<div ng-if="!item.balanceInfo.updatingBalance" data-options="disable_for_touch:true">
|
||||
<b class="m5r size-12">{{item.balanceInfo.totalBalance || 0}} {{item.settings.unitName}}</b>
|
||||
<span class="alt-currency size-10">{{item.balanceInfo.totalBalanceAlternative}} {{item.balanceInfo.alternativeIsoCode}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-reveal-modal" ng-click="cancel()">×</a>
|
||||
</script>
|
||||
</div>
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
</div>
|
||||
|
||||
<div class="input">
|
||||
<input type="text" id="address" name="address" ng-disabled="loading || !!$root.merchant || isPayUri"
|
||||
<input type="text" id="address" name="address" ng-disabled="loading || isPayUri"
|
||||
placeholder="{{'Bitcoin address'|translate}}" ng-model="address" valid-address required>
|
||||
<i class="fi-address-book"></i>
|
||||
<div ng-hide="showScanner || disableScanner">
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
<div class="small-9 columns">
|
||||
<div class="input">
|
||||
<input type="number" id="amount"
|
||||
ng-disabled="loading || ($root.merchant && +$root.merchant.total > 0) || isPayUri"
|
||||
ng-disabled="loading || isPayUri.fixedAmount"
|
||||
name="amount" placeholder="{{'Amount'|translate}}" ng-model="amount"
|
||||
ng-minlength="0.00000001" ng-maxlength="10000000000" valid-amount required
|
||||
autocomplete="off">
|
||||
|
|
@ -112,8 +112,7 @@
|
|||
<div class="small-9 columns">
|
||||
<div class="input">
|
||||
<input type="number" id="alternative"
|
||||
ng-disabled="loading || !isRateAvailable || ($root.merchant && +$root.merchant.total > 0) ||
|
||||
isPayUri"
|
||||
ng-disabled="loading || !isRateAvailable ||isPayUri"
|
||||
name="alternative" placeholder="{{'Amount'|translate}}" ng-model="alternative" requiredautocomplete="off">
|
||||
<i class="icon-usd"></i>
|
||||
</div>
|
||||
|
|
@ -136,10 +135,13 @@
|
|||
</div>
|
||||
|
||||
<div class="large-12 columns" ng-show="!!$root.merchant">
|
||||
<h3 >This is a payment protocol transaction</h3>
|
||||
<div class="send-note">
|
||||
<h3 >Payment Protocol Request</h3>
|
||||
<div class="send-note" ng-click="openPPModal(btx)">
|
||||
<p>
|
||||
<b>{{$root.merchant.pr.pd.memo || address}}</b>
|
||||
<span ng-show="!!$root.merchant.pr.ca"><i class="fi-lock green"></i> {{$root.merchant.pr.ca}}</span>
|
||||
<span ng-show="!$root.merchant.pr.ca"><i class="fi-unlock red"></i> Untrusted</span>
|
||||
|
||||
{{$root.merchant.pr.pd.memo || address}}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
@ -150,9 +152,7 @@
|
|||
<p ng-show="!!$root.merchant">
|
||||
Expires {{$root.merchant.expiration | amTimeAgo }}
|
||||
[{{$root.merchant.domain}}]
|
||||
<span ng-show="!!$root.merchant.pr.ca"><i class="fi-lock"></i> {{$root.merchant.pr.ca}}</span>
|
||||
<span ng-show="!$root.merchant.pr.ca" style="color:red;weight:bold;"><i class="fi-unlock"></i> Untrusted</span>
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
<div data-ng-init="" data-ng-controller="UriPaymentController">
|
||||
|
||||
<div class="loading-screen" data-alert>
|
||||
<div class="spinner">
|
||||
<div class="contener_general">
|
||||
<div class="contener_mixte"><div class="ballcolor ball_1"> </div></div>
|
||||
<div class="contener_mixte"><div class="ballcolor ball_2"> </div></div>
|
||||
<div class="contener_mixte"><div class="ballcolor ball_3"> </div></div>
|
||||
<div class="contener_mixte"><div class="ballcolor ball_4"> </div></div>
|
||||
</div>
|
||||
<span class="text-gray size-12" translate>Preparing payment...</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue