[#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
|
(def total-value
|
||||||
{:color colors/white-transparent})
|
{:color colors/white-transparent})
|
||||||
|
|
||||||
|
(def total-balance-tilde
|
||||||
|
{:color colors/white-transparent})
|
||||||
|
|
||||||
(defstyle total-balance-currency
|
(defstyle total-balance-currency
|
||||||
{:font-size 37
|
{:font-size 37
|
||||||
:margin-left 9
|
:margin-left 9
|
||||||
|
|
|
@ -51,6 +51,11 @@
|
||||||
[react/view {:style styles/total-balance}
|
[react/view {:style styles/total-balance}
|
||||||
[react/text {:style styles/total-balance-value
|
[react/text {:style styles/total-balance-value
|
||||||
:accessibility-label :total-amount-value-text}
|
:accessibility-label :total-amount-value-text}
|
||||||
|
(when (and
|
||||||
|
(not= "0" value)
|
||||||
|
(not= "..." value))
|
||||||
|
[react/text {:style styles/total-balance-tilde}
|
||||||
|
"~"])
|
||||||
value]
|
value]
|
||||||
[react/text {:style styles/total-balance-currency
|
[react/text {:style styles/total-balance-currency
|
||||||
:accessibility-label :total-amount-currency-text}
|
:accessibility-label :total-amount-currency-text}
|
||||||
|
|
|
@ -65,11 +65,12 @@
|
||||||
(or currency-code
|
(or currency-code
|
||||||
(-> currency :code keyword))
|
(-> currency :code keyword))
|
||||||
token->decimals)]
|
token->decimals)]
|
||||||
|
(if (pos? balance-total-value)
|
||||||
(-> balance-total-value
|
(-> balance-total-value
|
||||||
(money/with-precision 2)
|
(money/with-precision 2)
|
||||||
str
|
str
|
||||||
(i18n/format-currency (:code currency) false)
|
(i18n/format-currency (:code currency) false))
|
||||||
(->> (str "~"))))
|
"0"))
|
||||||
"...")))
|
"...")))
|
||||||
|
|
||||||
(re-frame/reg-sub :prices-loading?
|
(re-frame/reg-sub :prices-loading?
|
||||||
|
|
Loading…
Reference in New Issue