Refactor Glidera Authorization process
This commit is contained in:
parent
fc52a8cf87
commit
fcae682954
6 changed files with 230 additions and 229 deletions
|
|
@ -4,30 +4,24 @@
|
|||
</ion-nav-back-button>
|
||||
<ion-nav-title>Glidera</ion-nav-title>
|
||||
<ion-nav-buttons side="secondary">
|
||||
<button class="button button-clear button-small ng-hide" ng-show="!token && !connectingGlidera" ng-click="toggleOauthForm()">
|
||||
<span ng-hide="showOauthForm" translate>Enter Code</span>
|
||||
<span ng-show="showOauthForm" translate>Restart</span>
|
||||
<button class="button button-clear button-small ng-hide" ng-show="!account.token" ng-click="toggleOauthForm()">
|
||||
<span ng-hide="showOauthForm">Enter Code</span>
|
||||
<span ng-show="showOauthForm">Restart</span>
|
||||
</button>
|
||||
<button class="button button-clear button-small ng-hide" ng-show="token && !connectingGlidera && status && !status.userCanTransact" ng-click="retry()" translate>
|
||||
<button class="button button-clear button-small ng-hide" ng-show="account.token && account.status && !account.status.userCanTransact" ng-click="retry()">
|
||||
Refresh
|
||||
</button>
|
||||
</ion-nav-buttons>
|
||||
<ion-content scroll="false" class="ng-hide" ng-show="!token && !connectingGlidera">
|
||||
<div class="box-notification error m0" ng-show="!network">
|
||||
The Glidera integration is currently disabled.
|
||||
</div>
|
||||
<div class="box-notification warning m0" ng-show="network == 'testnet'">
|
||||
Testnet wallets only work with Glidera Sandbox Accounts.
|
||||
</div>
|
||||
<ion-content scroll="false" class="ng-hide" ng-show="!account.token">
|
||||
<div class="integration-onboarding">
|
||||
<div class="integration-onboarding-logo">
|
||||
<img src="img/glidera-logo.png">
|
||||
</div>
|
||||
<div class="integration-onboarding-description" ng-hide="showOauthForm" translate>Glidera's exchange service is available in the United States, and can take 1-2 weeks to buy or sell bitcoin.</div>
|
||||
<div class="integration-onboarding-description" ng-show="showOauthForm" translate>If you have trouble, contact Glidera support for direct assistance.</div>
|
||||
<div class="integration-onboarding-description" ng-hide="showOauthForm">Glidera's exchange service is available in the United States, and can take 1-2 weeks to buy or sell bitcoin.</div>
|
||||
<div class="integration-onboarding-description" ng-show="showOauthForm">If you have trouble, contact Glidera support for direct assistance.</div>
|
||||
<div class="integration-onboarding-cta" ng-show="!showOauthForm">
|
||||
<button class="button button-standard button-primary" ng-click="openAuthenticateWindow()" translate>Connect to Glidera</button>
|
||||
<button type="button" class="button button-standard button-secondary" ng-click="openSupportWindow()" translate>Glidera Support →</button>
|
||||
<button class="button button-standard button-primary" ng-click="openAuthenticateWindow()">Connect to Glidera</button>
|
||||
<button type="button" class="button button-standard button-secondary" ng-click="openSupportWindow()">Glidera Support →</button>
|
||||
</div>
|
||||
|
||||
<div ng-show="showOauthForm" class="integration-onboarding-oauthform">
|
||||
|
|
@ -43,13 +37,13 @@
|
|||
<input
|
||||
class="button button-standard button-primary"
|
||||
type="submit" value="Connect Glidera Account" ng-disabled="oauthCodeForm.$invalid">
|
||||
<button type="button" class="button button-standard button-secondary" ng-click="openSupportWindow()" translate>Glidera Support →</button>
|
||||
<button type="button" class="button button-standard button-secondary" ng-click="openSupportWindow()">Glidera Support →</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
<ion-content scroll="false" class="ng-hide" ng-show="token && !connectingGlidera && status && !status.userCanTransact">
|
||||
<ion-content scroll="false" class="ng-hide" ng-show="account.token && account.status && !account.status.userCanTransact">
|
||||
<div class="integration-onboarding">
|
||||
<div class="integration-onboarding-logo">
|
||||
<img src="img/glidera-logo.png">
|
||||
|
|
@ -62,35 +56,41 @@
|
|||
</div>
|
||||
</ion-content>
|
||||
|
||||
<ion-content class="ng-hide" ng-show="token && !connectingGlidera && status && status.userCanTransact">
|
||||
<ion-content class="ng-hide" ng-show="account.token && account.status && account.status.userCanTransact">
|
||||
<div class="text-center m20v">
|
||||
<img src="img/glidera-logo.png" width="170">
|
||||
</div>
|
||||
|
||||
<div class="list card"
|
||||
ng-show="status && status.userCanTransact">
|
||||
<a ng-show="status.userCanBuy"
|
||||
<div class="list card">
|
||||
<a ng-show="account.status.userCanBuy"
|
||||
class="item item-icon-right"
|
||||
href ui-sref="tabs.buyandsell.glidera.amount({isGlidera: 'buy', glideraAccessToken: token})">
|
||||
<img src="img/buy-bitcoin.svg" alt="buy bitcoin" width="45" class="item-img-buy">
|
||||
href ui-sref="tabs.buyandsell.glidera.amount({isGlidera: 'buy', glideraAccessToken: account.token})">
|
||||
<img src="img/buy-bitcoin.svg" alt="buy bitcoin" width="25" class="item-img-buy">
|
||||
Buy Bitcoin
|
||||
<span class="item-note" ng-show="account.price.buy">
|
||||
${{account.price.buy}}/BTC
|
||||
</span>
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
</a>
|
||||
<a class="item item-icon-right"
|
||||
ng-show="status.userCanSell"
|
||||
href ui-sref="tabs.buyandsell.glidera.amount({isGlidera: 'sell', glideraAccessToken: token})">
|
||||
<img src="img/sell-bitcoin.svg" alt="buy bitcoin" width="45" class="item-img-sell">
|
||||
ng-show="account.status.userCanSell"
|
||||
href ui-sref="tabs.buyandsell.glidera.amount({isGlidera: 'sell', glideraAccessToken: account.token})">
|
||||
<img src="img/sell-bitcoin.svg" alt="buy bitcoin" width="25" class="item-img-sell">
|
||||
Sell Bitcoin
|
||||
<span class="item-note" ng-show="account.price.sell">
|
||||
${{account.price.sell}}/BTC
|
||||
</span>
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="list card" ng-show="permissions && permissions.transaction_history && txs.length > 0">
|
||||
<div class="list card">
|
||||
<div class="item item-heading">
|
||||
Activity
|
||||
</div>
|
||||
<a ng-repeat="tx in txs"
|
||||
ng-click="openTxModal(token, tx)"
|
||||
<a ng-repeat="tx in account.txs"
|
||||
ng-click="openTxModal(tx)"
|
||||
ng-show="account.txs && account.txs.length > 0"
|
||||
class="item">
|
||||
|
||||
<span class="item-note">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue