formatted amount controller update + css + renames + included in views
This commit is contained in:
parent
01a7024b52
commit
9f418583ab
9 changed files with 58 additions and 39 deletions
|
|
@ -16,11 +16,13 @@
|
|||
<div class="send-amount-tool-input amount">
|
||||
<div class="primary-amount"
|
||||
ng-class="{long: vm.amount.length > 5, 'very-long': vm.amount.length > 10}">
|
||||
<span class="primary-amount-display text-selectable">{{vm.amount || '0'}} {{vm.unit}}</span>
|
||||
<span class="primary-amount-display text-selectable">
|
||||
<formatted-amount value="{{vm.amount || '0'}}" currency="{{vm.unit}}"></formatted-amount>
|
||||
</span>
|
||||
</div>
|
||||
<span ng-show="vm.globalResult">{{vm.globalResult}} {{vm.unit}}</span>
|
||||
<span ng-show="vm.globalResult"><formatted-amount value="{{vm.globalResult}}" currency="{{vm.unit}}"></formatted-amount></span>
|
||||
<div class="alternative-amount">
|
||||
<span class="text-selectable">{{vm.alternativeAmount || '0.00'}}</span> <span>{{vm.alternativeUnit}}</span>
|
||||
<span class="text-selectable"><formatted-amount value="{{vm.alternativeAmount || '0.00'}}" currency="{{vm.alternativeUnit}}"></formatted-amount></span>
|
||||
</div>
|
||||
<div class="switch-currencies" ng-click="vm.changeUnit()"><img src="img/icon-convert.svg"></div>
|
||||
</div>
|
||||
|
|
@ -43,7 +45,7 @@
|
|||
<div class="extra available-funds"
|
||||
ng-class="{warning: vm.fundsAreInsufficient}"
|
||||
ng-if="!vm.isRequestingSpecificAmount" translate>
|
||||
<span>Available Funds:</span> <span>{{vm.availableFunds}}</span>
|
||||
<span>Available Funds:</span> <span><formatted-amount value="{{vm.availableFunds}}"></formatted-amount></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -53,7 +55,7 @@
|
|||
<button class="button button-sendmax" ng-click="vm.sendMax()">
|
||||
<span>
|
||||
<span translate>Use All Available Funds</span> 
|
||||
<span class="available-funds-amount">({{vm.availableFunds}})</span>
|
||||
<span class="available-funds-amount">(<formatted-amount value="{{vm.availableFunds}}"></formatted-amount>)</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="amount"
|
||||
<div class="formatted-amount"
|
||||
ng-class="{ 'size-equal': displaySizeEqual }">
|
||||
<span ng-if="start.length > 0" class="start">{{start}}</span><span ng-if="middle.length > 0" class="middle">{{middle}}</span><span ng-if="end.length > 0" class="end">{{end}}</span><span ng-if="currency.length > 0" class="currency">{{currency}}</span>
|
||||
</div>
|
||||
|
|
@ -64,17 +64,16 @@
|
|||
|
||||
<span class="item-note text-right wallet-details__tx-amount">
|
||||
<span class="wallet-details__tx-amount" ng-class="{'wallet-details__tx-amount--recent': btx.recent, 'wallet-details__tx-amount--received': btx.action == 'received', 'wallet-details__tx-amount--sent': btx.action == 'sent'}">
|
||||
<span ng-if="btx.action == 'sent'">–</span>
|
||||
<span class="size-12" ng-if="btx.action == 'invalid'" translate>
|
||||
(possible double spend)
|
||||
</span>
|
||||
<span ng-if="btx.action != 'invalid'">
|
||||
{{btx.amountValueStr}} {{btx.amountUnitStr}}
|
||||
<formatted-amount value="{{btx.action == 'sent'?'-':''}}{{btx.amountValueStr}}" currency="{{btx.amountUnitStr}}"></formatted-amount>
|
||||
</span>
|
||||
</span>
|
||||
<div>
|
||||
<span class="size-12 wallet-details__tx-amount" ng-class="{'wallet-details__tx-amount--recent': btx.recent, 'wallet-details__tx-amount--received': btx.action == 'received', 'wallet-details__tx-amount--sent': btx.action == 'sent'}">
|
||||
{{btx.alternativeAmountStr}}
|
||||
<formatted-amount value="{{btx.alternativeAmountStr}}"></formatted-amount>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,12 @@
|
|||
Incomplete
|
||||
</span>
|
||||
<span ng-if="wallet.isComplete()">
|
||||
<span ng-if="selectedPriceDisplay == 'crypto' && !wallet.balanceHidden && !wallet.scanning"> {{wallet.status.totalBalanceStr ? wallet.status.totalBalanceStr : ( wallet.cachedBalance ? wallet.cachedBalance + (wallet.cachedBalanceUpdatedOn ? ' · ' + ( wallet.cachedBalanceUpdatedOn * 1000 | amTimeAgo) : '') : '' ) }} </span>
|
||||
<span ng-if="selectedPriceDisplay == 'fiat' && !wallet.balanceHidden && !wallet.scanning"> {{wallet.status.totalBalanceAlternative ? wallet.status.totalBalanceAlternative : ( wallet.cachedBalance ? wallet.cachedBalance + (wallet.cachedBalanceUpdatedOn ? ' · ' + ( wallet.cachedBalanceUpdatedOn * 1000 | amTimeAgo) : '') : '' ) }} {{wallet.status.alternativeIsoCode}}</span>
|
||||
<span ng-if="selectedPriceDisplay == 'crypto' && !wallet.balanceHidden && !wallet.scanning">
|
||||
<formatted-amount value="{{wallet.status.totalBalanceStr ? wallet.status.totalBalanceStr : ( wallet.cachedBalance ? wallet.cachedBalance + (wallet.cachedBalanceUpdatedOn ? ' · ' + ( wallet.cachedBalanceUpdatedOn * 1000 | amTimeAgo) : '') : '' ) }}"></formatted-amount>
|
||||
</span>
|
||||
<span ng-if="selectedPriceDisplay == 'fiat' && !wallet.balanceHidden && !wallet.scanning">
|
||||
<formatted-amount value="{{wallet.status.totalBalanceAlternative ? wallet.status.totalBalanceAlternative : ( wallet.cachedBalance ? wallet.cachedBalance + (wallet.cachedBalanceUpdatedOn ? ' · ' + ( wallet.cachedBalanceUpdatedOn * 1000 | amTimeAgo) : '') : '' ) }}" currency="{{wallet.status.alternativeIsoCode}}"></formatted-amount>
|
||||
</span>
|
||||
<span ng-if="wallet.scanning" translate> Scanning funds... </span>
|
||||
|
||||
<span ng-if="wallet.balanceHidden && !wallet.scanning" translate>[Balance Hidden]</span>
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@
|
|||
<span ng-if="btx.action == 'received'" translate>Receiving</span>
|
||||
</div>
|
||||
<div class="amount-label">
|
||||
<div class="amount">{{btx.amountValueStr}} <span class="unit">{{btx.amountUnitStr}}</span></div>
|
||||
<div class="amount"><formatted-amount value="{{btx.amountValueStr}}" currency="{{btx.amountUnitStr}}"></formatted-amount></div>
|
||||
<div class="alternative" ng-click="showRate = !showRate">
|
||||
<span ng-if="!showRate">{{btx.alternativeAmountStr}}</span>
|
||||
<span ng-if="!showRate"><formatted-amount value="{{btx.alternativeAmountStr}}"></formatted-amount></span>
|
||||
<span ng-if="showRate">
|
||||
<span ng-if="!rate">...</span>
|
||||
<span ng-if="rate">
|
||||
{{rate| currency:'':2}} {{alternativeIsoCode}} ({{rateDate | amDateFormat:'MM/DD/YYYY HH:mm a'}})
|
||||
<formatted-amount value="{{rate| currency:'':2}}" currency="{{alternativeIsoCode}}"></formatted-amount> ({{rateDate | amDateFormat:'MM/DD/YYYY HH:mm a'}})
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
<span class="label" translate>Fee</span>
|
||||
<span class="m10l">{{btx.feeStr || '...'}}</span>
|
||||
<span class="item-note m10l">
|
||||
<span>{{btx.feeFiatStr || '...'}} <span class="fee-rate" ng-if="btx.feeRateStr" translate>- {{btx.feeRateStr}} of the transaction</span></span>
|
||||
<span><span ng-if="btx.feeFiatStr"><formatted-amount value="{{btx.feeFiatStr}}"></formatted-amount></span><span ng-if="!btx.feeFiatStr">...</span><span class="fee-rate" ng-if="btx.feeRateStr" translate>- {{btx.feeRateStr}} of the transaction</span></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="item low-fees" ng-if="btx.action == 'received' && btx.lowFees">
|
||||
|
|
|
|||
|
|
@ -34,12 +34,12 @@
|
|||
on-hold="hideToggle()"
|
||||
ng-style="{'transform': amountScale}"
|
||||
ng-class="{amount__balance: amountIsCollapsible}">
|
||||
<strong class="size-36">{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}</strong>
|
||||
<strong class="size-36"><formatted-amount value="{{status.totalBalanceAlternative}}" currency="{{status.alternativeIsoCode}}"></formatted-amount></strong>
|
||||
<div
|
||||
class="size-14 amount-alternative"
|
||||
ng-if="status.totalBalanceAlternative && wallet.network == 'livenet'"
|
||||
ng-if="status.totalBalanceStr && wallet.network == 'livenet'"
|
||||
ng-style="{opacity: altAmountOpacity}">
|
||||
{{status.totalBalanceStr}}
|
||||
<formatted-amount value="{{status.totalBalanceStr}}"></formatted-amount>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -47,13 +47,14 @@
|
|||
ng-show="selectedPriceDisplay=='crypto' && !updateStatusError && !wallet.balanceHidden && !wallet.scanning"
|
||||
on-hold="hideToggle()"
|
||||
ng-style="{'transform': amountScale}"
|
||||
ng-if="status.totalBalanceStr"
|
||||
ng-class="{amount__balance: amountIsCollapsible}">
|
||||
<strong class="size-36">{{status.totalBalanceStr}}</strong>
|
||||
<strong class="size-36"><formatted-amount value="{{status.totalBalanceStr}}"></formatted-amount></strong>
|
||||
<div
|
||||
class="size-14 amount-alternative"
|
||||
ng-if="status.totalBalanceAlternative && wallet.network == 'livenet'"
|
||||
ng-style="{opacity: altAmountOpacity}">
|
||||
{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
|
||||
<formatted-amount value="{{status.totalBalanceAlternative}}" currency="{{status.alternativeIsoCode}}"></formatted-amount>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -86,7 +87,7 @@
|
|||
</strong>
|
||||
|
||||
<span>
|
||||
{{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
|
||||
<formatted-amount value="{{status.spendableBalanceAlternative}}" currency="{{status.alternativeIsoCode}}"></formatted-amount>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -127,12 +128,12 @@
|
|||
on-hold="hideToggle()"
|
||||
ng-style="{'transform': amountScale}"
|
||||
ng-class="{amount__balance: amountIsCollapsible}">
|
||||
<strong class="size-36">{{status.totalBalanceStr}}</strong>
|
||||
<strong ng-if="status.totalBalanceStr" class="size-36"><formatted-amount value="{{status.totalBalanceStr}}"></formatted-amount></strong>
|
||||
<div
|
||||
class="size-14 amount-alternative"
|
||||
ng-if="status.totalBalanceAlternative && wallet.network == 'livenet'"
|
||||
ng-style="{opacity: altAmountOpacity}">
|
||||
{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
|
||||
<formatted-amount value="{{status.totalBalanceAlternative}}" currency="{{status.alternativeIsoCode}}"></formatted-amount>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -142,12 +143,12 @@
|
|||
on-hold="hideToggle()"
|
||||
ng-style="{'transform': amountScale}"
|
||||
ng-class="{amount__balance: amountIsCollapsible}">
|
||||
<strong class="size-36">{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}</strong>
|
||||
<strong class="size-36"><formatted-amount value="{{status.totalBalanceAlternative}}" currency="{{status.alternativeIsoCode}}"></formatted-amount></strong>
|
||||
<div
|
||||
class="size-14 amount-alternative"
|
||||
ng-if="status.totalBalanceAlternative && wallet.network == 'livenet'"
|
||||
ng-if="status.totalBalanceStr && wallet.network == 'livenet'"
|
||||
ng-style="{opacity: altAmountOpacity}">
|
||||
{{status.totalBalanceStr}}
|
||||
<formatted-amount value="{{status.totalBalanceStr}}"></formatted-amount>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -180,7 +181,7 @@
|
|||
</strong>
|
||||
|
||||
<span>
|
||||
{{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
|
||||
<formatted-amount value="{{status.spendableBalanceAlternative}}" currency="{{status.alternativeIsoCode}}"></formatted-amount>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -189,7 +190,7 @@
|
|||
<button class="button button-standard button-primary amount__button-balance size-14" ng-click="openBalanceModal()">
|
||||
<i class="icon ion-ios-checkmark-outline"></i>
|
||||
<strong>
|
||||
{{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
|
||||
<formatted-amount value="{{status.spendableBalanceAlternative}}" currency="{{status.alternativeIsoCode}}"></formatted-amount>
|
||||
</strong>
|
||||
|
||||
<span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue