Browse Source

simplify display of currency values

fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
bab8826385
No known key found for this signature in database GPG Key ID: C6F8CE9FFDB2CED2
  1. 16
      views/includes/value-display.pug

16
views/includes/value-display.pug

@ -1,15 +1,15 @@
- var currencyFormatInfo = utils.getCurrencyFormatInfo(currencyFormatType);
if (currencyValue > 0)
span(class="monospace") #{utils.formatCurrencyAmount(currencyValue, currencyFormatType)}
- var parts = utils.formatCurrencyAmount(currencyValue, currencyFormatType).split(" ");
span.monospace #{parts[0]}
if (currencyFormatInfo.type == "native")
if (global.exchangeRates)
span
span(data-toggle="tooltip", title=utils.formatExchangedCurrency(currencyValue, "usd"))
i(class="fas fa-exchange-alt")
small.border-dotted.ml-1(data-toggle="tooltip", title=utils.formatExchangedCurrency(currencyValue, "usd")) #{parts[1]}
else if (currencyFormatInfo.type == "exchanged")
span
span(data-toggle="tooltip", title=utils.formatCurrencyAmount(currencyValue, coinConfig.defaultCurrencyUnit.name))
i(class="fas fa-exchange-alt")
small.border-dotted.ml-1(data-toggle="tooltip", title=utils.formatCurrencyAmount(currencyValue, coinConfig.defaultCurrencyUnit.name)) #{parts[1]}
else
span(class="monospace") 0
span.monospace 0
Loading…
Cancel
Save