[#5798] change balance tilde color, remove it when 0 balance
Signed-off-by: Dmitry Novotochinov <dmitry.novot@gmail.com>
This commit is contained in:
parent
a20facd895
commit
1b40ccbe86
|
@ -58,6 +58,9 @@
|
|||
(def total-value
|
||||
{:color colors/white-transparent})
|
||||
|
||||
(def total-balance-tilde
|
||||
{:color colors/white-transparent})
|
||||
|
||||
(defstyle total-balance-currency
|
||||
{:font-size 37
|
||||
:margin-left 9
|
||||
|
|
|
@ -51,6 +51,11 @@
|
|||
[react/view {:style styles/total-balance}
|
||||
[react/text {:style styles/total-balance-value
|
||||
:accessibility-label :total-amount-value-text}
|
||||
(when (and
|
||||
(not= "0" value)
|
||||
(not= "..." value))
|
||||
[react/text {:style styles/total-balance-tilde}
|
||||
"~"])
|
||||
value]
|
||||
[react/text {:style styles/total-balance-currency
|
||||
:accessibility-label :total-amount-currency-text}
|
||||
|
|
|
@ -65,11 +65,12 @@
|
|||
(or currency-code
|
||||
(-> currency :code keyword))
|
||||
token->decimals)]
|
||||
(if (pos? balance-total-value)
|
||||
(-> balance-total-value
|
||||
(money/with-precision 2)
|
||||
str
|
||||
(i18n/format-currency (:code currency) false)
|
||||
(->> (str "~"))))
|
||||
(i18n/format-currency (:code currency) false))
|
||||
"0"))
|
||||
"...")))
|
||||
|
||||
(re-frame/reg-sub :prices-loading?
|
||||
|
|
Loading…
Reference in New Issue