copay/public/views/sellGlidera.html

142 lines
6.1 KiB
HTML
Raw Normal View History

2015-08-31 14:12:04 -07:00
<div
class="topbar-container"
ng-include="'views/includes/topbar.html'"
ng-init="titleSection='Sell'; goBackToState = 'glidera'; noColor = true">
2015-08-31 14:12:04 -07:00
</div>
2015-09-08 13:36:08 -07:00
<div class="content glidera" ng-controller="sellGlideraController as sell">
2015-09-07 13:43:55 -07:00
<div class="onGoingProcess" ng-show="sell.loading">
<div class="onGoingProcess-content" ng-style="{'background-color':index.backgroundColor}">
<div class="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
2015-09-12 19:49:14 -07:00
<span>{{sell.loading}}</span>
2015-09-07 13:43:55 -07:00
</div>
</div>
<div ng-show="index.glideraLimits && !sell.show2faCodeInput && !sell.success">
2015-09-08 13:36:08 -07:00
<h4 class="title m0">
<div class="left">
<i class="fi-info size-24 m10r"></i>
</div>
<div class="size-10">
2015-09-12 19:49:14 -07:00
<span class="text-light">Daily sell limit</span>:
2015-09-10 12:19:07 -07:00
{{index.glideraLimits.dailySell|currency:'':2}} {{index.glideraLimits.currency}}
(remaining {{index.glideraLimits.dailySellRemaining|currency:'':2}} {{index.glideraLimits.currency}})
2015-09-08 13:36:08 -07:00
<br>
2015-09-12 19:49:14 -07:00
<span class="text-light">Monthly sell limit</span>:
2015-09-10 12:19:07 -07:00
{{index.glideraLimits.monthlySell|currency:'':2}} {{index.glideraLimits.currency}}
(remaining {{index.glideraLimits.monthlySellRemaining|currency:'':2}} {{index.glideraLimits.currency}})
2015-09-08 13:36:08 -07:00
</div>
</h4>
</div>
<div class="row m20t">
2015-09-02 22:50:59 -07:00
<div class="columns">
2015-08-31 14:12:04 -07:00
2015-09-08 13:36:08 -07:00
<div class="box-notification" ng-show="index.glideraLimits.transactDisabledPendingFirstTransaction">
2015-09-12 19:49:14 -07:00
<span class="text-warning size-14">
2015-09-08 13:36:08 -07:00
This operation was disabled because you have a pending first transaction
</span>
</div>
2015-09-02 22:50:59 -07:00
<div ng-show="!sell.show2faCodeInput && !sell.success">
<form name="sellPriceForm"
ng-submit="sell.get2faCode(index.glideraToken)" novalidate>
2015-09-11 09:11:41 -07:00
<div ng-if="index.glideraToken"
ng-init="sell.init(index.glideraTestnet)"
ng-click="openWalletsModal(sell.otherWallets)">
2015-09-12 19:49:14 -07:00
<label>Wallet</label>
2015-09-11 09:11:41 -07:00
<div class="input">
<input type="text" id="address" name="address" ng-disabled="sell.selectedWalletId"
ng-attr-placeholder="{{'Choose your source wallet'}}"
2015-09-11 09:11:41 -07:00
ng-model="sell.selectedWalletName" required>
<a class="postfix size-12 m0 text-gray">
<i class="icon-wallet size-18"></i>
</a>
</div>
</div>
2015-09-12 19:49:14 -07:00
<label><span>Amount in</span> {{showAlternative ? 'USD' : 'BTC'}}</label>
2015-09-02 22:50:59 -07:00
<div class="input">
<input ng-show="!showAlternative" type="number" id="qty"
2015-09-12 19:49:14 -07:00
name="qty" ng-attr-placeholder="{{'Amount'}}"
2015-09-02 22:50:59 -07:00
ng-minlength="0.00000001" ng-maxlength="10000000000"
ng-model="qty" autocomplete="off" ng-change="sell.getSellPrice(index.glideraToken, {'qty': qty})">
2015-08-31 14:12:04 -07:00
2015-09-02 22:50:59 -07:00
<input ng-show="showAlternative" type="number" id="fiat"
2015-09-12 19:49:14 -07:00
name="fiat" ng-attr-placeholder="{{'Amount'}}"
2015-09-02 22:50:59 -07:00
ng-model="fiat" autocomplete="off" ng-change="sell.getSellPrice(index.glideraToken, {'fiat': fiat})">
2015-08-31 14:12:04 -07:00
2015-09-02 22:50:59 -07:00
<a ng-show="!showAlternative" class="postfix"
ng-click="showAlternative = true; qty = null; sell.sellPrice = null">BTC</a>
<a ng-show="showAlternative" class="postfix"
ng-click="showAlternative = false; fiat = null; sell.sellPrice = null">USD</a>
2015-09-07 13:43:55 -07:00
<div class="text-center text-gray size-12 m20b" ng-show="!sell.gettingSellPrice && sell.sellPrice.qty">
2015-09-07 13:43:55 -07:00
Sell
2015-09-10 12:19:07 -07:00
<span ng-show="qty">{{sell.sellPrice.subtotal|currency:'':2}} {{sell.sellPrice.currency}} in Bitcoin</span>
2015-09-07 13:43:55 -07:00
<span ng-show="fiat">{{sell.sellPrice.qty}} BTC</span>
2015-09-10 12:19:07 -07:00
at {{sell.sellPrice.price|currency:'':2}} {{sell.sellPrice.currency}}/BTC
</div>
2015-09-12 19:49:14 -07:00
<div class="text-center text-gray size-12 m20b" ng-show="!sell.gettingSellPrice && !sell.sellPrice.qty">
(Enter the amount to get the exchange rate)
2015-09-07 13:43:55 -07:00
</div>
<div class="text-center text-gray size-12 m20b" ng-show="sell.gettingSellPrice">
...
</div>
2015-09-08 09:58:24 -07:00
<input class="button black expand round"
ng-style="{'background-color':index.backgroundColor}"
2015-09-12 19:49:14 -07:00
type="submit" value="{{'Continue'}}"
2015-09-11 09:11:41 -07:00
ng-disabled="index.glideraLimits.transactDisabledPendingFirstTransaction || !sell.sellPrice.qty ||
!sell.selectedWalletId || sell.loading">
2015-09-02 22:50:59 -07:00
</div>
2015-09-07 13:43:55 -07:00
</form>
2015-08-31 14:12:04 -07:00
</div>
2015-09-02 22:50:59 -07:00
<div ng-show="sell.show2faCodeInput && !sell.success">
2015-09-12 19:49:14 -07:00
<div class="m10t text-center">
2015-09-10 12:19:07 -07:00
{{sell.sellPrice.qty}} BTC &rarr; {{sell.sellPrice.subtotal|currency:'':2}} {{sell.sellPrice.currency}}
2015-09-12 19:49:14 -07:00
<p class="m20t">
A SMS containing a confirmation code was sent to your phone. <br>
Please, enter the code below
</p>
<form name="sellForm"
ng-submit="sell.createTx(index.glideraToken, index.glideraPermissions, twoFaCode, index.feeRateToSendMax)" novalidate>
<input type="number" ng-model="twoFaCode" required>
<input class="button black expand round"
ng-style="{'background-color':index.backgroundColor}"
2015-09-12 19:49:14 -07:00
type="submit" value="{{'Sell'}}" ng-disabled="sellForm.$invalid || sell.loading">
</form>
2015-09-12 19:49:14 -07:00
<p class="m10t size-12 text-gray">
Bitcoins will be immediately sent from your wallet to Glidera. Fiat will be deposited in your bank account in 4-6 business days.
</p>
</div>
2015-09-02 22:50:59 -07:00
</div>
2015-09-07 13:43:55 -07:00
<div class="box-notification" ng-show="sell.error && !sell.success">
<span class="text-warning size-14">
2015-09-12 19:49:14 -07:00
{{sell.error}}
2015-09-07 13:43:55 -07:00
</span>
</div>
2015-09-02 22:50:59 -07:00
<div class="text-center" ng-show="sell.success">
2015-09-12 19:49:14 -07:00
<h1>Sale initiated</h1>
<p class="text-gray">
2015-09-02 22:50:59 -07:00
A transfer has been initiated to your bank account and should arrive in 4-6 business days.
</p>
2015-08-31 14:12:04 -07:00
2015-09-02 22:50:59 -07:00
<button class="outline dark-gray round expand"
2015-09-08 11:42:55 -07:00
ng-click="$root.go('glidera')">OK</button>
2015-09-02 22:50:59 -07:00
</div>
2015-08-31 14:12:04 -07:00
</div>
</div>
<div class="extra-margin-bottom"></div>