copay/public/views/glidera.html

188 lines
7.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.home">
Close
</button>
</ion-nav-buttons>
<ion-nav-title>Glidera</ion-nav-title>
</ion-nav-bar>
<ion-content ng-controller="glideraController as glidera" ng-init="init()">
<div class="box-notification text-center size-12 text-warning" ng-show="network == 'testnet'">
<i class="fi-info"></i>
Testnet wallets only work with Glidera Sandbox Accounts
</div>
<div class="m20b box-notification" ng-if="error">
<div class="text-warning">
<span>{{error}}</span>
</div>
</div>
<div class="m10t text-center" ng-show="error">
<button
class="button"
ng-show="error.indexOf('Forbidden') == 40"
ng-click="token = null; error = null">
Request a new token
</button>
<div ng-show="error.indexOf('Forbidden') != 40">
<button
class="button"
ng-click="init(token)">
Retry
</button>
<div class="m20t size-12">
<a class="text-gray" href ui-sref="glidera.preferences">Preferences</a>
</div>
</div>
</div>
<div ng-if="!token && !error">
<div ng-init="showOauthForm = false">
<div class="text-center m20b">
<img src="img/glidera-logo.png" ng-click="update(token, permissions)" width="200">
</div>
<div class="text-center small-10 small-centered columns" ng-show="!showOauthForm">
<p class="m10b">You can buy and sell Bitcoin with a US bank account directly in Copay.</p>
<p class="m20t padding text-gray size-12 text-left">
DISCLOSURE.<br>
Glidera Inc. (Glidera) is providing the service of buying or selling bitcoins to Copay users. To enable this
service, Glidera has registered with US Treasury Departments FinCEN as a Money Service Business
(#31000042625755). Users of Copay must agree to the service agreement presented by Glidera prior to obtaining
Glideras service of buying or selling bitcoins. Service available in U.S. and Canada only. In U.S. (buy & sell) CA, GA, IL, KS,
MA, MD, MO, MT, MN, SC, TX, AZ, CO, DE, ME, NJ, PA, TN, UT, NV, WI. In Canada (buy & sell) AB, BC, MB, NB, NL, NS, NT, NU,
ON, PE, SK, YT.
</p>
<p class="m20t text-gray size-12">Connect your Glidera account to get started</p>
<button class="button"
ng-click="openExternalLink(glidera.getAuthenticateUrl(), '_system'); showOauthForm = true">
Connect to Glidera
</button>
<div class="m10t">
<a href ng-click="showOauthForm = true" class="text-gray size-12">
Do you already have the Oauth Code?
</a>
</div>
</div>
<div ng-show="showOauthForm">
<div class="text-left box-notification size-12 text-warning" ng-show="error">
{{error}}
</div>
<form name="oauthCodeForm" ng-submit="glidera.submitOauthCode(code)" novalidate>
<div class="list">
<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>
<div class="row">
<div class="col">
<input type="button"
value="Cancel"
class="button button-block"
ng-click="showOauthForm = false; error = null">
</div>
<div class="col">
<input
class="button button-block"
type="submit"
value="Get started"
ng-disabled="oauthCodeForm.$invalid">
</div>
</div>
</form>
</div>
</div>
</div>
<div ng-if="token && permissions">
<div class="p20v text-center">
<img src="img/glidera-logo.png" ng-click="update(token, permissions)" width="100">
</div>
<div class="list">
<a class="item item-icon-left" href ui-sref="glidera.preferences">
<i class="icon ion-gear-a"></i>
<span ng-show="personalInfo">{{personalInfo.firstName}} {{personalInfo.lastName}}</span>
<span class="item-note" ng-show="email">
{{email}}
</span>
</a>
</div>
<div class="padding">
<div class="text-center m30v size-12"
ng-show="status && !status.userCanTransact">
<h4 class="text-bold"> Complete Setup</h4>
<div>Your Glidera account is not ready to transact. Please, verify it at <b>Glidera.io</b></div>
<a class="button"
ng-init="glideraUrl = network == 'testnet' ? 'https://sandbox.glidera.io/login' :
'https://glidera.io/login'"
ng-click="openExternalLink(glideraUrl)">
Go to Glidera
</a>
</div>
</div>
</div>
<div class="list"
ng-show="status && status.userCanTransact">
<a ng-show="status.userCanBuy"
class="item item-avatar"
href ui-sref="glidera.buy">
<img src="img/buy-bitcoin.svg" alt="buy bitcoin" width="40">
Buy Bitcoin
</a>
<a class="item item-avatar"
ng-show="status.userCanSell"
href ui-sref="glidera.sell">
<img src="img/sell-bitcoin.svg" alt="buy bitcoin" width="40">
Sell Bitcoin
</a>
</div>
<div ng-show="permissions.transaction_history">
<h4>Activity</h4>
<div ng-show="txs.length == 0 "
class="size-12 p10 text-center text-gray">
No activity in your account
</div>
<div class="list">
<a ng-repeat="tx in txs"
ng-click="glidera.openTxModal(token, tx)"
class="item item-avatar">
<img src="img/bought.svg" alt="bought" width="39" ng-show="tx.type == 'BUY' && tx.status == 'COMPLETE'">
<img src="img/bought-pending.svg" alt="bought" width="33" ng-show="tx.type == 'BUY' && tx.status == 'PROCESSING'">
<img src="img/sold.svg" alt="bought" width="39" ng-show="tx.type == 'SELL' && tx.status == 'COMPLETE'">
<img src="img/sold-pending.svg" alt="bought" width="33" ng-show="tx.type == 'SELL' && tx.status == 'PROCESSING'">
<h2>
<span ng-show="tx.type == 'BUY'">Bought</span>
<span ng-show="tx.type == 'SELL'">Sold</span>
<b>{{tx.qty}}</b> BTC
</h2>
<p>
{{tx.subtotal|currency:'':2}} {{tx.currency}}
</p>
<div class="right">
<div class="m5t size-12 text-gray">
<div ng-show="tx.status == 'COMPLETE'">
<time ng-if="tx.transactionDate">{{tx.transactionDate | amTimeAgo}}</time>
</div>
<div ng-show="tx.status == 'PROCESSING'">
<span class="label outline gray radius text-gray text-info" ng-if="tx.status == 'PROCESSING'">Processing</span>
</div>
</div>
</div>
</a>
</div>
</div>
</div>
</ion-content>
</ion-view>