2016-12-08 06:04:07 -08:00
|
|
|
|
<ion-view id="coinbase">
|
|
|
|
|
<ion-nav-bar class="bar-royal">
|
|
|
|
|
<ion-nav-back-button>
|
|
|
|
|
</ion-nav-back-button>
|
|
|
|
|
<ion-nav-title>Coinbase</ion-nav-title>
|
|
|
|
|
</ion-nav-bar>
|
2016-04-13 10:08:03 -07:00
|
|
|
|
|
2016-12-08 06:04:07 -08:00
|
|
|
|
<ion-content>
|
2016-04-13 10:08:03 -07:00
|
|
|
|
|
2017-01-03 07:43:08 -08:00
|
|
|
|
<div class="box-notification error" ng-show="error">
|
|
|
|
|
<ul class="no-bullet m0 size-12">
|
|
|
|
|
<li ng-repeat="err in error.errors" ng-bind-html="err.message"></li>
|
|
|
|
|
</ul>
|
2016-04-13 10:08:03 -07:00
|
|
|
|
</div>
|
|
|
|
|
|
2017-01-12 20:05:52 -08:00
|
|
|
|
<div ng-if="!accessToken && !error" ng-init="showOauthForm = false">
|
2016-04-13 10:08:03 -07:00
|
|
|
|
<div class="text-center m20v">
|
|
|
|
|
<img src="img/coinbase-logo.png" width="200">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="text-center small-10 small-centered columns" ng-show="!showOauthForm">
|
|
|
|
|
|
|
|
|
|
<p class="m20t text-gray size-12">Connect your Coinbase account to get started</p>
|
|
|
|
|
|
2016-12-08 06:04:07 -08:00
|
|
|
|
<button class="button button-standard button-primary"
|
2017-01-03 07:43:08 -08:00
|
|
|
|
ng-click="coinbase.openAuthenticateWindow()">
|
2016-04-13 10:08:03 -07:00
|
|
|
|
Connect to Coinbase
|
2016-12-08 06:04:07 -08:00
|
|
|
|
</button>
|
|
|
|
|
<div class="m20t">
|
2016-04-13 10:08:03 -07:00
|
|
|
|
<a href ng-click="showOauthForm = true" class="text-gray size-12">
|
|
|
|
|
Do you already have the Oauth Code?
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2016-12-08 06:04:07 -08:00
|
|
|
|
<div ng-show="showOauthForm">
|
2016-04-13 10:08:03 -07:00
|
|
|
|
<div class="text-left box-notification" ng-show="coinbase.error">
|
|
|
|
|
<ul class="no-bullet m0 text-warning size-12">
|
|
|
|
|
<li ng-repeat="err in coinbase.error.errors" ng-bind-html="err.message"></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<form name="oauthCodeForm" ng-submit="coinbase.submitOauthCode(code)" novalidate>
|
2016-12-08 06:04:07 -08:00
|
|
|
|
<div class="list settings-input-group">
|
|
|
|
|
<label class="item item-input item-stacked-label">
|
|
|
|
|
<span class="input-label">OAuth Code</span>
|
|
|
|
|
<input type="text"
|
|
|
|
|
ng-model="code"
|
|
|
|
|
ng-attr-placeholder="{{'Paste the authorization code here'}}" required>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
2016-04-13 10:08:03 -07:00
|
|
|
|
<input
|
2016-12-08 06:04:07 -08:00
|
|
|
|
class="button button-standard button-primary"
|
|
|
|
|
type="submit" value="Connect Coinbase Account" ng-disabled="oauthCodeForm.$invalid">
|
2016-04-13 10:08:03 -07:00
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-01-12 20:05:52 -08:00
|
|
|
|
<div ng-if="accessToken && !error">
|
2016-04-13 10:08:03 -07:00
|
|
|
|
|
2017-01-12 20:05:52 -08:00
|
|
|
|
<div class="m20t text-center" ng-click="updateTransactions()">
|
2016-12-08 06:13:33 -08:00
|
|
|
|
<img src="img/coinbase-logo.png" width="200">
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-01-12 20:05:52 -08:00
|
|
|
|
<div class="m10t size-12 text-center text-gray">
|
2017-01-14 14:22:33 -08:00
|
|
|
|
<span ng-show="!buyPrice || !sellPrice">...</span>
|
2017-01-12 20:05:52 -08:00
|
|
|
|
<span ng-show="buyPrice && sellPrice">
|
|
|
|
|
{{buyPrice.amount}} {{buyPrice.currency}}
|
|
|
|
|
|
|
|
|
|
|
{{sellPrice.amount}} {{sellPrice.currency}}
|
|
|
|
|
</span>
|
2017-01-11 14:38:05 -08:00
|
|
|
|
</div>
|
|
|
|
|
|
2017-01-12 20:05:52 -08:00
|
|
|
|
<div class="list card">
|
2016-12-08 06:04:07 -08:00
|
|
|
|
<a class="item item-icon-right"
|
2017-01-12 04:58:12 -08:00
|
|
|
|
href ui-sref="tabs.buyandsell.coinbase.amount({nextStep: 'tabs.buyandsell.coinbase.buy', currency: currency})">
|
2017-01-13 06:05:33 -08:00
|
|
|
|
<img src="img/buy-bitcoin.svg" alt="buy bitcoin" width="30" class="item-img-buy" style="vertical-align:
|
|
|
|
|
text-bottom;">
|
2016-12-08 06:04:07 -08:00
|
|
|
|
Buy Bitcoin
|
|
|
|
|
<i class="icon bp-arrow-right"></i>
|
|
|
|
|
</a>
|
|
|
|
|
<a class="item item-icon-right"
|
2017-01-12 04:58:12 -08:00
|
|
|
|
href ui-sref="tabs.buyandsell.coinbase.amount({nextStep: 'tabs.buyandsell.coinbase.sell', currency: currency})">
|
2017-01-13 06:05:33 -08:00
|
|
|
|
<img src="img/sell-bitcoin.svg" alt="sell bitcoin" width="30" class="item-img-sell" style="vertical-align:
|
|
|
|
|
text-bottom;">
|
2016-12-08 06:04:07 -08:00
|
|
|
|
Sell Bitcoin
|
|
|
|
|
<i class="icon bp-arrow-right"></i>
|
|
|
|
|
</a>
|
2016-04-13 10:08:03 -07:00
|
|
|
|
</div>
|
|
|
|
|
|
2016-12-08 06:04:07 -08:00
|
|
|
|
<div class="list card">
|
|
|
|
|
<div class="item item-heading" ng-click="updateTransactions()">
|
|
|
|
|
Activity
|
2017-01-12 20:37:13 -08:00
|
|
|
|
</div>
|
2016-12-08 06:04:07 -08:00
|
|
|
|
<a class="item"
|
2016-12-30 14:08:51 -08:00
|
|
|
|
ng-if="pendingTransactions.data && !error"
|
|
|
|
|
ng-repeat="(id, tx) in pendingTransactions.data | orderObjectBy:'updated_at':true track by $index"
|
2016-12-08 06:04:07 -08:00
|
|
|
|
ng-click="coinbase.openTxModal(tx)">
|
2016-04-13 10:08:03 -07:00
|
|
|
|
|
2016-12-08 06:04:07 -08:00
|
|
|
|
<span class="item-note">
|
2017-01-12 15:29:34 -08:00
|
|
|
|
<div class="assertive" ng-show="tx.error || tx.status == 'error'">
|
2016-04-13 10:08:03 -07:00
|
|
|
|
Error
|
|
|
|
|
</div>
|
2016-12-08 06:04:07 -08:00
|
|
|
|
<div ng-show="!tx.error">
|
2016-04-13 10:08:03 -07:00
|
|
|
|
<div ng-show="tx.status == 'completed'">
|
|
|
|
|
<time ng-if="tx.created_at">{{tx.created_at | amTimeAgo}}</time>
|
|
|
|
|
</div>
|
|
|
|
|
<div ng-show="tx.status == 'pending'">
|
2016-12-08 06:04:07 -08:00
|
|
|
|
<span ng-if="tx.status == 'pending'">Pending</span>
|
2016-04-13 10:08:03 -07:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2016-12-08 06:04:07 -08:00
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<img class="left m10r" src="img/bought-pending.svg" alt="bought" width="24" ng-show="(tx.type == 'buy' || (tx.to && tx.type == 'send')) && tx.status != 'completed'">
|
|
|
|
|
<img class="left m10r" src="img/bought.svg" alt="bought" width="30" ng-show="(tx.type == 'buy' || (tx.to && tx.type == 'send')) && tx.status == 'completed'">
|
|
|
|
|
<img class="left m10r" src="img/sold-pending.svg" alt="sold" width="24" ng-show="tx.from && tx.type == 'send'">
|
|
|
|
|
<img class="left m10r" src="img/sold.svg" alt="sold" width="30" ng-show="!tx.from && tx.type == 'sell' && tx.status == 'completed'">
|
|
|
|
|
|
|
|
|
|
<h2>
|
|
|
|
|
<span ng-show="tx.type == 'sell' && tx.status == 'completed'">Sold</span>
|
2017-01-05 13:10:57 -08:00
|
|
|
|
<span ng-show="tx.type == 'send' && tx.to && tx.status == 'completed'">Bought</span>
|
2016-12-08 06:04:07 -08:00
|
|
|
|
</h2>
|
|
|
|
|
<p>
|
|
|
|
|
<span ng-if="tx.type == 'sell' || (tx.type == 'send' && tx.from)">-</span>{{tx.amount.amount.replace('-','')}}
|
|
|
|
|
{{tx.amount.currency}}
|
|
|
|
|
</p>
|
|
|
|
|
</a>
|
2016-04-13 10:08:03 -07:00
|
|
|
|
</div>
|
2017-01-12 20:37:13 -08:00
|
|
|
|
<div class="m10t text-center" ng-if="loading">
|
|
|
|
|
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
|
|
|
|
|
</div>
|
2016-04-13 10:08:03 -07:00
|
|
|
|
|
|
|
|
|
</div>
|
2016-12-08 06:04:07 -08:00
|
|
|
|
</ion-content>
|
|
|
|
|
</ion-view>
|