copay/public/views/bitpayCard.html

219 lines
7.8 KiB
HTML
Raw Normal View History

2016-08-22 13:43:31 -07:00
<ion-view>
2016-08-31 12:54:53 -07:00
<ion-nav-bar class="bar-royal">
2016-08-22 13:43:31 -07:00
<ion-nav-buttons side="primary">
2016-09-01 09:16:28 -07:00
<button class="button back-button" ui-sref="tabs.home">
<i class="icon ion-ios-arrow-thin-left"></i>
2016-08-22 13:43:31 -07:00
</button>
</ion-nav-buttons>
<ion-nav-title>BitPay Card</ion-nav-title>
<ion-nav-buttons side="secondary">
<button class="button no-border" ui-sref="bitpayCard.preferences">
<i class="icon ion-gear-b"></i>
</button>
</ion-nav-buttons>
</ion-nav-bar>
<ion-content ng-controller="bitpayCardController as bitpayCard" ng-init="bitpayCard.init()">
<div class="box-notification warning" ng-show="network == 'testnet'">
2016-08-10 11:29:31 -07:00
Sandbox version. Only for testing purpose
</div>
<div class="m20t text-center size-12 text-gray" ng-show="!bitpayCard.bitpayCardAuthenticated && bitpayCard.loadingSession">
Loading...
</div>
2016-08-22 13:43:31 -07:00
<div ng-show="!bitpayCard.bitpayCardAuthenticated && !bitpayCard.loadingSession">
<div class="text-center m20t">
2016-08-10 11:29:31 -07:00
<img src="img/bitpay-card-visa.svg" width="200">
</div>
2016-08-22 13:43:31 -07:00
<h4 class="text-center">
2016-08-10 11:29:31 -07:00
<span ng-show="!bitpayCard.bitpayCardTwoFactorPending">Login to your account</span>
<span ng-show="bitpayCard.bitpayCardTwoFactorPending">2-Step Verification</span>
2016-08-22 13:43:31 -07:00
</h4>
2016-08-10 11:29:31 -07:00
<form
ng-show="!bitpayCard.bitpayCardTwoFactorPending"
name="authenticateForm"
ng-submit="bitpayCard.authenticate()"
novalidate>
2016-08-31 15:02:15 -07:00
<div class="card list">
2016-08-22 13:43:31 -07:00
<label class="item item-input item-stacked-label">
<span class="input-label">Email</span>
<input name="email"
type="email"
ng-model="email"
ng-disabled="bitpayCard.authenticating"
required>
</label>
<label class="item item-input item-stacked-label">
<span class="input-label">Password</span>
<input name="password"
type="password"
ng-model="password"
ng-disabled="bitpayCard.authenticating"
required>
</label>
2016-08-10 11:29:31 -07:00
</div>
2016-08-22 13:43:31 -07:00
2016-08-31 15:02:15 -07:00
<input class="button button-block button-positive"
2016-08-22 13:43:31 -07:00
type="submit"
ng-disabled="!authenticateForm.$valid || bitpayCard.authenticating"
value="Login">
2016-08-10 11:29:31 -07:00
</form>
<p ng-show="bitpayCard.bitpayCardTwoFactorPending" class="size-12 text-center text-gray">
Enter the verification code generated by the authenticator app on your phone.
</p>
<form
ng-show="bitpayCard.bitpayCardTwoFactorPending"
name="authenticate2FAForm"
ng-submit="bitpayCard.authenticate2FA()"
novalidate>
2016-08-22 13:43:31 -07:00
<div class="list">
<label class="item item-input item-stacked-label">
<span class="input-label">Verification Code</span>
<input name="twoFactorCode"
type="text"
ng-model="twoFactorCode"
ng-disabled="bitpayCard.authenticating"
required>
</label>
2016-08-10 11:29:31 -07:00
</div>
2016-08-22 13:43:31 -07:00
2016-08-31 15:02:15 -07:00
<input class="button button-block button-positive"
2016-08-22 13:43:31 -07:00
type="submit"
ng-disabled="!authenticate2FAForm.$valid || bitpayCard.authenticating"
value="Login">
2016-08-10 11:29:31 -07:00
</form>
</div>
<div ng-show="bitpayCard.bitpayCardAuthenticated && !bitpayCard.visaCardActivated && !addFunds">
<div class="oh pr">
<div class="amount" ng-style="{'background-color': '#293C92'}">
<div ng-show="!loadingHistory && bitpayCard.bitpayCardCurrentBalance" ng-click="bitpayCard.update()">
<strong class="size-36">${{bitpayCard.bitpayCardCurrentBalance}}</strong>
<div class="size-12">Available balance</div>
</div>
<div ng-show="loadingHistory">
<strong class="size-36">...</strong>
</div>
</div>
<div class="camera-icon" ng-show="bitpayCard.bitpayCardCurrentBalance">
<a ng-click="addFunds = true">
2016-08-22 13:43:31 -07:00
<i class="icon ion-plus size-21"></i>
2016-08-10 11:29:31 -07:00
</a>
</div>
</div>
<select ng-model="dateRange" ng-change="bitpayCard.update(dateRange)">
<option value="last30Days">Recent Activity</option>
<option value="lastMonth">Last Month</option>
<option value="all">All Activity</option>
</select>
<div
class="oh pr m20t text-gray size-12 text-center"
2016-08-31 05:55:11 -07:00
ng-show="!bitpayCard.bitpayCardTransactionHistory[0] &&
2016-08-10 11:29:31 -07:00
!bitpayCard.bitpayCardInvoiceHistory[0] && !loadingHistory">
No transactions yet
</div>
<div ng-show="loadingHistory" class="oh pr m20t text-gray text-center">
2016-08-22 13:43:31 -07:00
<i class="icon ion-android-sync"></i>
2016-08-10 11:29:31 -07:00
</div>
<div
ng-show="!loadingHistory"
ng-repeat="tx in bitpayCard.bitpayCardTransactionHistory | orderBy: ['pending','-timestamp']"
2016-08-22 13:43:31 -07:00
class="row"
2016-08-10 11:29:31 -07:00
ng-init="bitpayCard.getMerchantInfo(tx)">
2016-08-22 13:43:31 -07:00
<div class="col" ng-init="icon = bitpayCard.getIconName(tx)">
2016-08-10 11:29:31 -07:00
<img class="m5t" ng-src="img/mcc-icons/{{icon}}.svg" width="22">
</div>
2016-08-22 13:43:31 -07:00
<div class="col">
2016-08-10 11:29:31 -07:00
<div class="size-12 text-bold">
{{tx.merchant.name}}
</div>
<div class="size-12">
{{tx.merchant.city}}, {{tx.merchant.state}}
</div>
</div>
<div
ng-init="desc = bitpayCard.processDescription(tx)"
2016-08-22 13:43:31 -07:00
class="col">
2016-08-10 11:29:31 -07:00
{{desc}}
</div>
2016-08-22 13:43:31 -07:00
<div class="col">
2016-08-10 11:29:31 -07:00
<img ng-show="!tx.pending" ng-src="img/check.svg" width="14">
<img ng-show="tx.pending" ng-src="img/sync.svg" width="14">
</div>
2016-08-22 13:43:31 -07:00
<div class="col text-right size-12 text-gray">
2016-08-10 11:29:31 -07:00
<div class="size-14"
ng-class="{
'text-success': tx.amount.indexOf('-') == -1 && !tx.pending,
'text-gray': tx.amount.indexOf('-') == -1 && tx.pending}">
{{tx.amount | currency:'$':2 }}
</div>
<time>{{tx.timestamp | amTimeAgo}}</time>
</div>
</div>
</div>
2016-08-22 13:43:31 -07:00
<div ng-show="bitpayCard.bitpayCardAuthenticated && !bitpayCard.visaCardActivated && addFunds">
2016-08-10 11:29:31 -07:00
<form
name="createInvoiceForm"
ng-submit="bitpayCard.sendFunds()"
novalidate>
2016-08-22 13:43:31 -07:00
<div class="list">
<label class="item item-input item-stacked-label">
<span class="input-label">Amount</span>
2016-08-10 11:29:31 -07:00
<input
2016-08-22 13:43:31 -07:00
type="number"
id="fiat"
name="fiat"
ng-attr-placeholder="{{'Amount in USD'}}"
min="0.01"
max="2000"
ng-model="fiat"
autocomplete="off"
required>
<a class="postfix">USD</a>
2016-08-22 13:43:31 -07:00
</label>
2016-08-10 11:29:31 -07:00
<wallets ng-if="wallets[0]" wallets="wallets"></wallets>
2016-08-10 11:29:31 -07:00
</div>
<p class="size-12 text-warning" ng-show="bitpayCard.isMultisigWallet">
You selected a multisignature wallet. Please note that the transaction will only appear on your card's
Activity when the payment is fully signed.
</p>
2016-08-22 13:43:31 -07:00
<div class="row">
<div class="col">
<button class="button button-block button-stable"
type="button"
2016-08-31 05:55:11 -07:00
ng-click="addFunds = false">
2016-08-22 13:43:31 -07:00
Cancel
</button>
2016-08-10 11:29:31 -07:00
</div>
2016-08-22 13:43:31 -07:00
<div class="col">
<button class="button button-block"
ng-disabled="!fiat"
2016-08-22 13:43:31 -07:00
type="submit">
Send
</button>
2016-08-10 11:29:31 -07:00
</div>
</div>
</form>
</div>
2016-08-22 13:43:31 -07:00
</ion-content>
</ion-view>