Dan Janosik
6 years ago
No known key found for this signature in database
GPG Key ID: C6F8CE9FFDB2CED2
3 changed files with
7 additions and
1 deletions
-
app/utils.js
-
views/includes/value-display.pug
-
views/layout.pug
|
|
@ -167,6 +167,9 @@ function formatCurrencyAmountWithForcedDecimalPlaces(amount, formatType, forcedD |
|
|
|
dec = dec.times(global.exchangeRates[formatInfo.multiplier]); |
|
|
|
|
|
|
|
return addThousandsSeparators(dec.toDecimalPlaces(decimalPlaces)) + " " + formatInfo.name; |
|
|
|
|
|
|
|
} else { |
|
|
|
return formatCurrencyAmountWithForcedDecimalPlaces(amount, coinConfig.defaultCurrencyUnit.name, forcedDecimalPlaces); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
@ -8,6 +8,9 @@ if (currencyValue > 0) |
|
|
|
if (global.exchangeRates) |
|
|
|
small.border-dotted.ml-1(data-toggle="tooltip", title=utils.formatExchangedCurrency(currencyValue, "usd")) #{parts[1]} |
|
|
|
|
|
|
|
else |
|
|
|
small.ml-1 #{parts[1]} |
|
|
|
|
|
|
|
else if (currencyFormatInfo.type == "exchanged") |
|
|
|
small.border-dotted.ml-1(data-toggle="tooltip", title=utils.formatCurrencyAmount(currencyValue, coinConfig.defaultCurrencyUnit.name)) #{parts[1]} |
|
|
|
|
|
|
|
|
|
@ -83,7 +83,7 @@ html(lang="en") |
|
|
|
if (coinConfig.currencyUnits) |
|
|
|
span(class="dropdown-header") Currency Units |
|
|
|
each item in coinConfig.currencyUnits |
|
|
|
if (item.type == "native" || config.queryExchangeRates) |
|
|
|
if (item.type == "native" || (config.queryExchangeRates && !config.privacyMode)) |
|
|
|
a(class="dropdown-item", href=("/changeSetting?name=currencyFormatType&value=" + item.values[0])) |
|
|
|
each valueName in item.values |
|
|
|
if (currencyFormatType == valueName) |
|
|
|