Adds filters to every fiat values

This commit is contained in:
Gustavo Maximiliano Cortez 2015-09-10 16:19:07 -03:00
parent fc7a87f83a
commit 1f975dc283
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
8 changed files with 50 additions and 46 deletions

View File

@ -27,12 +27,12 @@
</div>
<div class="size-10">
<span class="text-light" translate>Daily buy limit</span>:
${{index.glideraLimits.dailyBuy}}
(remaining ${{index.glideraLimits.dailyBuyRemaining}})
{{index.glideraLimits.dailyBuy|currency:'':2}} {{index.glideraLimits.currency}}
(remaining {{index.glideraLimits.dailyBuyRemaining|currency:'':2}} {{index.glideraLimits.currency}})
<br>
<span class="text-light" translate>Monthly buy limit</span>:
${{index.glideraLimits.monthlyBuy}}
(remaining ${{index.glideraLimits.monthlyBuyRemaining}})
{{index.glideraLimits.monthlyBuy|currency:'':2}} {{index.glideraLimits.currency}}
(remaining {{index.glideraLimits.monthlyBuyRemaining|currency:'':2}} {{index.glideraLimits.currency}})
</div>
</h4>
</div>
@ -67,7 +67,7 @@
<div class="text-center text-gray size-12 m20b" ng-show="!buy.gettingBuyPrice && buy.buyPrice.qty">
Buy
<span ng-show="qty">{{buy.buyPrice.currency}} {{buy.buyPrice.subtotal}} in Bitcoin</span>
<span ng-show="qty">{{buy.buyPrice.subtotal|currency:'':2}} {{buy.buyPrice.currency}} in Bitcoin</span>
<span ng-show="fiat">{{buy.buyPrice.qty}} BTC</span>
at {{buy.buyPrice.price}} {{buy.buyPrice.currency}}/BTC
</div>
@ -88,7 +88,7 @@
</div>
<div ng-show="buy.show2faCodeInput && !buy.success">
<div class="m10t text-center" translate>
{{buy.buyPrice.currency}} {{buy.buyPrice.subtotal}} &rarr; {{buy.buyPrice.qty}} BTC
{{buy.buyPrice.subtotal|currency:'':2}} {{buy.buyPrice.currency}} &rarr; {{buy.buyPrice.qty}} BTC
<p class="m20t" translate>
A SMS containing a confirmation code was sent to your phone. <br>
Please, enter the code below

View File

@ -165,7 +165,7 @@
<div class="large-4 medium-4 small-4 columns">
<span class="size-16">
{{tx.subtotal}} {{tx.currency}}
{{tx.subtotal|currency:'':2}} {{tx.currency}}
</span>
</div>
<div class="large-4 medium-4 small-4 columns text-right">

View File

@ -1,15 +1,16 @@
<div class="m20tp text-center">
<div class="row">
<h1 class="text-center m20b" translate>Revoke Glidera Token</h1>
<div class="large-6 medium-6 small-6 columns">
<button class="button warning expand round" ng-click="ok()">
<i class="fi-trash"></i> <span translate>Yes</span>
</button>
</div>
<div class="large-6 medium-6 small-6 columns">
<button class="button light-gray expand outline round" ng-click="cancel()">
<i class="fi-x"></i> <span class="tu" translate>Cancel</span>
</button>
</div>
<h1 class="text-center m20b" translate>Are you sure you would like to log out of your Glidera account?</h1>
<p class="text-gray" translate>You will need to log back in to buy or sell bitcoin in Copay.</p>
<div class="large-6 medium-6 small-6 columns">
<button class="button light-gray expand outline round" ng-click="cancel()">
<i class="fi-arrow-left"></i> <span class="tu" translate>Back</span>
</button>
</div>
<div class="large-6 medium-6 small-6 columns">
<button class="button warning expand round" ng-click="ok()">
<span translate>Log out</span>
</button>
</div>
</div>
</div>

View File

@ -18,7 +18,7 @@
ng-style="{'background-color':color}" translate>Bought</span>
<span class="label tu gray radius" ng-show="tx.type == 'SELL'" translate>Sold</span>
<div class="size-42">
{{tx.subtotal}} {{tx.currency}}
{{tx.subtotal|currency:'':2}} {{tx.currency}}
</div>
<div class="size-12 text-gray">
<span class="text-success" ng-if="tx.status == 'COMPLETE'">Completed</span>
@ -32,28 +32,30 @@
<ul class="no-bullet size-14 m0">
<li ng-show="tx.transactionDate" class="line-b p10 oh">
<span class="text-gray" translate>Date</span>:
<span class="text-gray" translate>Date</span>
<span class="right">{{tx.transactionDate | amCalendar}}</span>
</li>
<li ng-show="tx.price" class="line-b p10 oh">
<span class="text-gray" translate>Price</span>:
<span class="right">${{tx.price}} {{tx.currency}}</span>
<span class="text-gray" translate>Exchange rate</span>
<span class="right">{{tx.price|currency:'':2}} {{tx.currency}}/BTC</span>
</li>
</ul>
<h4 class="title m0">&nbsp;</h4>
<ul class="no-bullet size-14 m0">
<li ng-show="tx.subtotal" class="line-b p10 oh">
<span class="text-gray" translate>Subtotal</span>:
<span class="right">${{tx.subtotal}} {{tx.currency}}</span>
<span class="text-gray" translate>Subtotal</span>
<span class="right">{{tx.subtotal|currency:'':2}} {{tx.currency}}</span>
</li>
<li ng-show="tx.fees" class="line-b p10 oh">
<span class="text-gray" translate>Fees</span>:
<span class="right">${{tx.fees}} {{tx.currency}}</span>
<span class="text-gray" translate>Fees</span>
<span class="right">{{tx.fees|currency:'':2}} {{tx.currency}}</span>
</li>
<li ng-show="tx.total" class="line-b p10 oh">
<span class="text-gray" translate>Total</span>:
<span class="right">${{tx.total}} {{tx.currency}}</span>
<li ng-show="tx.total" class="line-b p10 oh text-bold">
<span class="text-gray" translate>Total</span>
<span class="right">{{tx.total|currency:'':2}} {{tx.currency}}</span>
</li>
</ul>
<div class="extra-margin-bottom"></div>

View File

@ -199,49 +199,49 @@
<li class="line-b p20">
<span translate>Daily Buy</span>
<span class="right text-gray">
{{glidera.limits.dailyBuy}} {{glidera.limits.currency}}
{{glidera.limits.dailyBuy|currency:'':2}} {{glidera.limits.currency}}
</span>
</li>
<li class="line-b p20">
<span translate>Daily Sell</span>
<span class="right text-gray">
{{glidera.limits.dailySell}} {{glidera.limits.currency}}
{{glidera.limits.dailySell|currency:'':2}} {{glidera.limits.currency}}
</span>
</li>
<li class="line-b p20">
<span translate>Monthly Buy</span>
<span class="right text-gray">
{{glidera.limits.monthlyBuy}} {{glidera.limits.currency}}
{{glidera.limits.monthlyBuy|currency:'':2}} {{glidera.limits.currency}}
</span>
</li>
<li class="line-b p20">
<span translate>Monthly Sell</span>
<span class="right text-gray">
{{glidera.limits.monthlySell}} {{glidera.limits.currency}}
{{glidera.limits.monthlySell|currency:'':2}} {{glidera.limits.currency}}
</span>
</li>
<li class="line-b p20">
<span translate>Daily Buy Remaining</span>
<span class="right text-gray">
{{glidera.limits.dailyBuyRemaining}} {{glidera.limits.currency}}
{{glidera.limits.dailyBuyRemaining|currency:'':2}} {{glidera.limits.currency}}
</span>
</li>
<li class="line-b p20">
<span translate>Daily Sell Remaining</span>
<span class="right text-gray">
{{glidera.limits.dailySellRemaining}} {{glidera.limits.currency}}
{{glidera.limits.dailySellRemaining|currency:'':2}} {{glidera.limits.currency}}
</span>
</li>
<li class="line-b p20">
<span translate>Monthly Buy Remaining</span>
<span class="right text-gray">
{{glidera.limits.monthlyBuyRemaining}} {{glidera.limits.currency}}
{{glidera.limits.monthlyBuyRemaining|currency:'':2}} {{glidera.limits.currency}}
</span>
</li>
<li class="line-b p20">
<span translate>Monthly Sell Remaining</span>
<span class="right text-gray">
{{glidera.limits.monthlySellRemaining}} {{glidera.limits.currency}}
{{glidera.limits.monthlySellRemaining|currency:'':2}} {{glidera.limits.currency}}
</span>
</li>
<li class="line-b p20">

View File

@ -27,12 +27,12 @@
</div>
<div class="size-10">
<span class="text-light" translate>Daily sell limit</span>:
${{index.glideraLimits.dailySell}}
(${{index.glideraLimits.dailySellRemaining}} remaining)
{{index.glideraLimits.dailySell|currency:'':2}} {{index.glideraLimits.currency}}
(remaining {{index.glideraLimits.dailySellRemaining|currency:'':2}} {{index.glideraLimits.currency}})
<br>
<span class="text-light" translate>Monthly sell limit</span>:
${{index.glideraLimits.monthlySell}}
(${{index.glideraLimits.monthlySellRemaining}} remaining)
{{index.glideraLimits.monthlySell|currency:'':2}} {{index.glideraLimits.currency}}
(remaining {{index.glideraLimits.monthlySellRemaining|currency:'':2}} {{index.glideraLimits.currency}})
</div>
</h4>
</div>
@ -67,9 +67,9 @@
<div class="text-center text-gray size-12 m20b" ng-show="!sell.gettingSellPrice && sell.sellPrice.qty">
Sell
<span ng-show="qty"> {{sell.sellPrice.currency}} {{sell.sellPrice.subtotal}} in Bitcoin</span>
<span ng-show="qty">{{sell.sellPrice.subtotal|currency:'':2}} {{sell.sellPrice.currency}} in Bitcoin</span>
<span ng-show="fiat">{{sell.sellPrice.qty}} BTC</span>
at {{sell.sellPrice.price}} {{sell.sellPrice.currency}}/BTC
at {{sell.sellPrice.price|currency:'':2}} {{sell.sellPrice.currency}}/BTC
</div>
<div class="text-center text-gray size-12 m20b" ng-show="!sell.gettingSellPrice && !sell.sellPrice.qty" translate>
@ -89,7 +89,7 @@
</div>
<div ng-show="sell.show2faCodeInput && !sell.success">
<div class="m10t text-center" translate>
{{sell.sellPrice.qty}} BTC &rarr; {{sell.sellPrice.currency}} {{sell.sellPrice.subtotal}}
{{sell.sellPrice.qty}} BTC &rarr; {{sell.sellPrice.subtotal|currency:'':2}} {{sell.sellPrice.currency}}
<p class="m20t" translate>
A SMS containing a confirmation code was sent to your phone. <br>
Please, enter the code below

View File

@ -11,6 +11,7 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
this.getBuyPrice = function(token, price) {
var self = this;
this.error = null;
if (!price || (price && !price.qty && !price.fiat)) {
this.buyPrice = null;
return;

View File

@ -14,8 +14,8 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
this.getSellPrice = function(token, price) {
var self = this;
this.error = null;
if (!price || (price && !price.qty && !price.fiat)) {
this.error = null;
this.sellPrice = null;
return;
}