This commit is contained in:
Gustavo Maximiliano Cortez 2015-09-07 17:43:55 -03:00
commit 40113052f4
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
6 changed files with 139 additions and 79 deletions

View file

@ -1,7 +1,7 @@
<div
class="topbar-container"
ng-include="'views/includes/topbar.html'"
ng-init="titleSection='Buy Bitcoin'; goBackToState = 'glidera'">
ng-init="titleSection='Buy'; goBackToState = 'glidera'">
</div>
@ -16,7 +16,7 @@
<div class="rect4"></div>
<div class="rect5"></div>
</div>
<span translate>Sending request to Glidera...</span>
<span>{{buy.loading|translate}}</span>
</div>
</div>
@ -25,7 +25,7 @@
<div ng-show="!buy.show2faCodeInput && !buy.success">
<form name="buyPriceForm"
ng-submit="buy.get2faCode(index.glideraToken)" novalidate>
<label>Amount in {{showAlternative ? 'USD' : 'BTC'}}</label>
<label><span translate>Amount in</span> {{showAlternative ? 'USD' : 'BTC'}}</label>
<div class="input">
<input ng-show="!showAlternative" type="number" id="qty"
name="qty" ng-attr-placeholder="{{'Amount'|translate}}"
@ -49,7 +49,7 @@
</div>
<input class="button dark-gray outline round expand"
type="submit" value="Continue" ng-disabled="!buy.buyPrice.qty || buy.loading">
type="submit" value="{{'Continue'|translate}}" ng-disabled="!buy.buyPrice.qty || buy.loading">
</div>
</form>
</div>
@ -62,10 +62,10 @@
</p>
<form name="buyForm"
ng-submit="buy.sendRequest(index.glideraToken, index.glideraPermissions, twoFaCode)" novalidate>
<label>Enter 2FA Code</label>
<label translate>Enter 2FA Code</label>
<input type="number" ng-model="twoFaCode" required>
<input class="button dark-gray outline round expand"
type="submit" value="Buy Bitcoin" ng-disabled="buyForm.$invalid || buy.loading">
type="submit" value="{{'Buy'|translate}}" ng-disabled="buyForm.$invalid || buy.loading">
</form>
</div>
<div class="box-notification" ng-show="buy.error && !buy.success">
@ -74,13 +74,13 @@
</span>
</div>
<div class="text-center" ng-show="buy.success">
<h1>Purchase complete</h1>
<h1 translate>Purchase complete</h1>
<p class="text-gray" translate>
A transfer has been initiated from your bank account. Your bitcoin should arrive in your wallet in 4-6 business days.
</p>
<button class="outline dark-gray round expand"
ng-click="$root.go('glidera')">
ng-click="$root.go('glidera')" translate>
Finish
</button>
</div>

View file

@ -1,19 +1,32 @@
<div
class="topbar-container"
ng-include="'views/includes/topbar.html'"
ng-init="titleSection='Sell Bitcoin'; goBackToState = 'glidera'">
ng-init="titleSection='Sell'; goBackToState = 'glidera'">
</div>
<div class="content glidera p20v"
ng-controller="sellGlideraController as sell">
<div class="content glidera p20v" ng-controller="sellGlideraController as sell">
<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>
<span>{{sell.loading|translate}}</span>
</div>
</div>
<div class="row">
<div class="columns">
<div ng-show="!sell.show2faCodeInput && !sell.success">
<form name="sellPriceForm"
ng-submit="sell.get2faCode(index.glideraToken)" novalidate>
<label>Amount in {{showAlternative ? 'USD' : 'BTC'}}</label>
<label><span translate>Amount in</span> {{showAlternative ? 'USD' : 'BTC'}}</label>
<div class="input">
<input ng-show="!showAlternative" type="number" id="qty"
name="qty" ng-attr-placeholder="{{'Amount'|translate}}"
@ -28,42 +41,47 @@
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>
<input class="button dark-gray outline round"
type="submit" value="Continue" ng-disabled="!sell.sellPrice.qty">
<div class="text-center text-gray size-12 m20b" ng-show="sell.sellPrice.qty">
Sell
<span ng-show="qty">${{sell.sellPrice.subtotal}} {{sell.sellPrice.currency}} in Bitcoin</span>
<span ng-show="fiat">{{sell.sellPrice.qty}} BTC</span>
at ${{sell.sellPrice.price}} {{sell.sellPrice.currency}}
</div>
<input class="button dark-gray outline round expand"
type="submit" value="{{'Continue'|translate}}" ng-disabled="!sell.sellPrice.qty || sell.loading">
</div>
</form>
<div class="text-gray size-12 m10b" ng-show="sell.sellPrice.qty">
Sell
<span ng-show="qty">${{sell.sellPrice.subtotal}} {{sell.sellPrice.currency}} in Bitcoin</span>
<span ng-show="fiat">{{sell.sellPrice.qty}} BTC</span>
at ${{sell.sellPrice.price}} {{sell.sellPrice.currency}}
</div>
</form>
</div>
<div ng-show="sell.show2faCodeInput && !sell.success">
<p class="text-center text-gray">
The bitcoin amount of {{sell.sellPrice.qty}} will be immediately sent from your bitcoin
wallet ({{index.walletName}}) to Glidera.
<p class="text-center text-gray" translate>
The bitcoin amount of {{sell.sellPrice.qty}} will be immediately sent from your bitcoin wallet ({{index.walletName}}) to Glidera.
</p>
<p class="text-center text-gray">
The total of ${{sell.sellPrice.subtotal}} {{sell.sellPrice.currency}} will be deposited
in your bank account in 4-6 business days.
<p class="text-center text-gray" translate>
The total of ${{sell.sellPrice.subtotal}} {{sell.sellPrice.currency}} will be deposited in your bank account in 4-6 business days.
</p>
<form name="sellForm"
ng-submit="sell.createTx(index.glideraToken, twoFaCode)" novalidate>
<label>Enter 2FA Code</label>
ng-submit="sell.createTx(index.glideraToken, index.glideraPermissions, twoFaCode)" novalidate>
<label translate>Enter 2FA Code</label>
<input type="number" ng-model="twoFaCode" required>
<input class="button dark-gray outline round"
type="submit" value="Sell Bitcoin">
<input class="button dark-gray outline round expand"
type="submit" value="{{'Sell'|translate}}" ng-disabled="sellForm.$invalid || sell.loading">
</form>
</div>
<div class="box-notification" ng-show="sell.error && !sell.success">
<span class="text-warning size-14">
{{sell.error|translate}}
</span>
</div>
<div class="text-center" ng-show="sell.success">
<h1>Sale complete</h1>
<p class="text-gray">
<h1 translate>Sale complete</h1>
<p class="text-gray" translate>
A transfer has been initiated to your bank account and should arrive in 4-6 business days.
</p>
<button class="outline dark-gray round expand"
ng-click="$root.go('glidera')">Finish</button>
ng-click="$root.go('glidera')" translate>Finish</button>
</div>
</div>
</div>

View file

@ -168,26 +168,18 @@
</div>
<div ng-if="index.txps[0]">
<div ng-show="index.requiresMultipleSignatures">
<h4 class="title m0" translate>Payment Proposals</h4>
<div class="last-transactions pr" ng-repeat="tx in index.txps"
ng-include="index.txTemplateUrl">
</div>
<div class="text-gray text-center size-12 p10t"
ng-show="index.lockedBalanceSat && !index.updatingStatus">
<span translate>Total Locked Balance</span>:
<b>{{index.lockedBalanceStr}} </b>
<span> {{index.lockedBalanceAlternative}}
{{index.alternativeIsoCode}} </span>
</div>
<h4 ng-show="index.requiresMultipleSignatures" class="title m0" translate>Payment Proposals</h4>
<h4 ng-show="!index.requiresMultipleSignatures" class="title m0" translate>Unsent transactions</h4>
<div class="last-transactions pr" ng-repeat="tx in index.txps"
ng-include="index.txTemplateUrl">
</div>
<div ng-show="!index.requiresMultipleSignatures">
<h4 class="title m0" translate>Unsent transactions</h4>
<div class="last-transactions pr" ng-repeat="tx in index.txps"
ng-include="index.txTemplateUrl">
</div>
<div class="text-gray text-center size-12 p10t"
ng-show="index.lockedBalanceSat && !index.updatingStatus">
<span translate>Total Locked Balance</span>:
<b>{{index.lockedBalanceStr}} </b>
<span> {{index.lockedBalanceAlternative}}
{{index.alternativeIsoCode}} </span>
</div>
</div>
<div class="extra-margin-bottom"></div>