Introduces label component

Label component located inside `status-im.ui.components.react`
namespace, called i18n-text. It replaces the need for the standard way
of creating labels using both `react/text` and `i18n/label`.

Signed-off-by: Goran Jovic <goranjovic@gmail.com>
This commit is contained in:
Cheuk Yin Ng 2018-07-09 17:08:54 -07:00 committed by Goran Jovic
parent e9fcba001a
commit 11bb009787
No known key found for this signature in database
GPG Key ID: D429D1A9B2EB8A8E
36 changed files with 79 additions and 109 deletions

View File

@ -103,6 +103,12 @@
(dissoc :font) (dissoc :font)
(assoc :style (merge style font))))])) (assoc :style (merge style font))))]))
(defn i18n-text
[{:keys [style key]}]
(let [default-style {:letter-spacing -0.2
:font-size 14}]
[text {:style (merge default-style style)} (i18n/label key)]))
(defn icon (defn icon
([n] (icon n styles/icon-default)) ([n] (icon n styles/icon-default))
([n style] ([n style]

View File

@ -36,8 +36,7 @@
{:on-press #(re-frame/dispatch [:add-contact contact-identity]) {:on-press #(re-frame/dispatch [:add-contact contact-identity])
:accessibility-label :add-to-contacts-button} :accessibility-label :add-to-contacts-button}
[react/view style/add-contact [react/view style/add-contact
[react/text {:style style/add-contact-text} [react/i18n-text {:style style/add-contact-text :key :add-to-contacts}]]])))
(i18n/label :t/add-to-contacts)]]])))
(defn- on-options [chat-id chat-name group-chat? public?] (defn- on-options [chat-id chat-name group-chat? public?]
(list-selection/show {:title (if public? (str "#" chat-name) chat-name) (list-selection/show {:title (if public? (str "#" chat-name) chat-name)

View File

@ -19,8 +19,6 @@
(def title-text (def title-text
{:font-weight :bold {:font-weight :bold
:font-size 14
:letter-spacing -0.2
:line-height 20}) :line-height 20})
(def label (def label

View File

@ -21,7 +21,8 @@
[react/view [react/view
[vector-icons/icon icon style]] [vector-icons/icon icon style]]
[react/view (merge options.styles/label style) [react/view (merge options.styles/label style)
[react/text {:style (merge options.styles/label-text style)} (i18n/label label)]]]]) [react/i18n-text {:style (merge options.styles/label-text style)
:key label}]]]])
(defn view [] (defn view []
(let [{:keys [chat-id message-id]} @(re-frame/subscribe [:get-current-chat-ui-prop :message-options]) (let [{:keys [chat-id message-id]} @(re-frame/subscribe [:get-current-chat-ui-prop :message-options])
@ -30,7 +31,7 @@
[bottom-info/container (* styles/item-height 2) [bottom-info/container (* styles/item-height 2)
[react/view [react/view
[react/view options.styles/title [react/view options.styles/title
[react/text {:style options.styles/title-text} (i18n/label :message-not-sent)]] [react/i18n-text {:style options.styles/title-text :key :message-not-sent}]]
[action-item {:label :resend-message [action-item {:label :resend-message
:icon :icons/refresh :icon :icons/refresh
:on-press #(do :on-press #(do

View File

@ -163,8 +163,7 @@
[react/view (styles/profile-icon-mask size)]) [react/view (styles/profile-icon-mask size)])
(when edit? (when edit?
[react/view (styles/profile-icon-edit-text-containter size) [react/view (styles/profile-icon-edit-text-containter size)
[react/text {:style styles/profile-icon-edit-text} [react/i18n-text {:style styles/profile-icon-edit-text :key :edit}]])
(i18n/label :t/edit)]])
(if (and photo-path (seq photo-path)) (if (and photo-path (seq photo-path))
[photos/photo photo-path styles] [photos/photo photo-path styles]
[default-chat-icon name styles])])) [default-chat-icon name styles])]))

View File

@ -18,7 +18,6 @@
(def sign-you-in (def sign-you-in
{:margin-top 16 {:margin-top 16
:font-size 13 :font-size 13
:letter-spacing -0.2
:color colors/text-light-gray}) :color colors/text-light-gray})
(def bottom-button-container (def bottom-button-container

View File

@ -74,8 +74,7 @@
(when processing (when processing
[react/view styles/processing-view [react/view styles/processing-view
[components/activity-indicator {:animating true}] [components/activity-indicator {:animating true}]
[react/text {:style styles/sign-you-in} [react/i18n-text {:style styles/sign-you-in :key :sign-you-in}]])
(i18n/label :t/sign-you-in)]])
(when-not processing (when-not processing
[react/view {:style styles/bottom-button-container} [react/view {:style styles/bottom-button-container}
(when-not can-navigate-back? (when-not can-navigate-back?

View File

@ -18,7 +18,6 @@
(def sign-you-in (def sign-you-in
{:margin-top 16 {:margin-top 16
:font-size 13 :font-size 13
:letter-spacing -0.2
:color colors/text-light-gray}) :color colors/text-light-gray})
(def recovery-phrase-input (def recovery-phrase-input

View File

@ -65,8 +65,7 @@
(if processing (if processing
[react/view styles/processing-view [react/view styles/processing-view
[react/activity-indicator {:animating true}] [react/activity-indicator {:animating true}]
[react/text {:style styles/sign-you-in} [react/i18n-text {:style styles/sign-you-in :key :sign-you-in}]]
(i18n/label :t/sign-you-in)]]
[react/view {:style styles/bottom-button-container} [react/view {:style styles/bottom-button-container}
[react/view {:style {:flex 1}}] [react/view {:style {:flex 1}}]
[components.common/bottom-button [components.common/bottom-button

View File

@ -6,9 +6,7 @@
:background-color colors/white}) :background-color colors/white})
(def gray-label (def gray-label
{:font-size 14 {:color colors/gray})
:letter-spacing -0.2
:color colors/gray})
(def black-label (def black-label
{:font-size 15 {:font-size 15

View File

@ -67,13 +67,11 @@
(re-frame/dispatch [:open-dapp-in-browser dapp]))}] (re-frame/dispatch [:open-dapp-in-browser dapp]))}]
[components/separator {:margin-left 72}]] [components/separator {:margin-left 72}]]
[react/view styles/description-container [react/view styles/description-container
[react/text {:style styles/gray-label} [react/i18n-text {:style styles/gray-label :key :description}]
(i18n/label :t/description)]
[react/text {:style (merge styles/black-label {:padding-top 18})} [react/text {:style (merge styles/black-label {:padding-top 18})}
description] description]
[components/separator {:margin-top 15}] [components/separator {:margin-top 15}]
[react/text {:style (merge styles/gray-label {:padding-top 18})} [react/i18n-text {:style (merge styles/gray-label {:padding-top 18}) :key :url}]
(i18n/label :t/url)]
[react/text {:style (merge styles/black-label {:padding-top 14})} [react/text {:style (merge styles/black-label {:padding-top 14})}
dapp-url] dapp-url]
[components/separator {:margin-top 6}]]])) [components/separator {:margin-top 6}]]]))

View File

@ -16,8 +16,7 @@
(defstyle dapp-text (defstyle dapp-text
{:color colors/gray {:color colors/gray
:ios {:font-size 14 :ios {:margin-top 4}
:margin-top 4}
:android {:font-size 13}}) :android {:font-size 13}})
(def toolbar (def toolbar

View File

@ -31,8 +31,7 @@
:font :toolbar-title :font :toolbar-title
:accessibility-label :dapp-name-text} :accessibility-label :dapp-name-text}
name] name]
[react/text {:style styles/dapp-text} [react/i18n-text {:style styles/dapp-text :key :dapp}]]]]))
(i18n/label :t/dapp)]]]]))
(def browser-config (def browser-config
(reader/read-string (slurp "./src/status_im/utils/browser_config.edn"))) (reader/read-string (slurp "./src/status_im/utils/browser_config.edn")))
@ -53,8 +52,7 @@
(defn- web-view-error [_ code desc] (defn- web-view-error [_ code desc]
(reagent/as-element (reagent/as-element
[react/view styles/web-view-error [react/view styles/web-view-error
[react/text {:style styles/web-view-error-text} [react/i18n-text {:style styles/web-view-error-text :key :web-view-error}]
(i18n/label :t/web-view-error)]
[react/text {:style styles/web-view-error-text} [react/text {:style styles/web-view-error-text}
(str code)] (str code)]
[react/text {:style styles/web-view-error-text} [react/text {:style styles/web-view-error-text}

View File

@ -149,9 +149,7 @@
:margin-horizontal 34}) :margin-horizontal 34})
(def no-chats-text (def no-chats-text
{:font-size 14 {:line-height 21
:line-height 21
:letter-spacing -0.2
:text-align :center :text-align :center
:color colors/gray}) :color colors/gray})
@ -182,8 +180,6 @@
:margin-top 8 :margin-top 8
:android {:margin-bottom 82} :android {:margin-bottom 82}
:ios {:margin-bottom 32} :ios {:margin-bottom 32}
:font-size 14
:letter-spacing -0.2
:text-align :center :text-align :center
:color colors/gray}) :color colors/gray})

View File

@ -68,11 +68,10 @@
[react/view {:style styles/welcome-image-container} [react/view {:style styles/welcome-image-container}
[react/image {:source (:welcome-image resources/ui) [react/image {:source (:welcome-image resources/ui)
:style styles/welcome-image}]] :style styles/welcome-image}]]
[react/text {:style styles/welcome-text} [react/i18n-text {:style styles/welcome-text :key :welcome-to-status}]
(i18n/label :t/welcome-to-status)]
[react/view [react/view
[react/text {:style styles/welcome-text-description} [react/i18n-text {:style styles/welcome-text-description
(i18n/label :t/welcome-to-status-description)]]])) :key :welcome-to-status-description}]]]))
(views/defview home [] (views/defview home []
(views/letsubs [home-items [:home-items] (views/letsubs [home-items [:home-items]
@ -84,8 +83,7 @@
[welcome view-id] [welcome view-id]
(empty? home-items) (empty? home-items)
[react/view styles/no-chats [react/view styles/no-chats
[react/text {:style styles/no-chats-text} [react/i18n-text {:style styles/no-chats-text :key :no-recent-chats}]]
(i18n/label :t/no-recent-chats)]]
:else :else
[list/flat-list {:data home-items [list/flat-list {:data home-items
:key-fn first :key-fn first

View File

@ -30,8 +30,6 @@
{:line-height 21 {:line-height 21
:margin-top 8 :margin-top 8
:margin-bottom 16 :margin-bottom 16
:font-size 14
:letter-spacing -0.2
:text-align :center :text-align :center
:color colors/gray}) :color colors/gray})

View File

@ -12,11 +12,11 @@
[status-bar/status-bar {:flat? true}] [status-bar/status-bar {:flat? true}]
[react/view {:style styles/intro-logo-container} [react/view {:style styles/intro-logo-container}
[components.common/logo styles/intro-logo]] [components.common/logo styles/intro-logo]]
[react/text {:style styles/intro-text} [react/i18n-text {:style styles/intro-text
(i18n/label :t/intro-text)] :key :intro-text}]
[react/view [react/view
[react/text {:style styles/intro-text-description} [react/i18n-text {:style styles/intro-text-description
(i18n/label :t/intro-text-description)]] :key :intro-text-description}]]
[react/view styles/buttons-container [react/view styles/buttons-container
[components.common/button {:button-style {:flex-direction :row} [components.common/button {:button-style {:flex-direction :row}
:on-press #(re-frame/dispatch [:navigate-to :create-account]) :on-press #(re-frame/dispatch [:navigate-to :create-account])

View File

@ -47,7 +47,7 @@
:container styles/input-container :container styles/input-container
:default-value (get-in manage-network [:url :value]) :default-value (get-in manage-network [:url :value])
:on-change-text #(re-frame/dispatch [:network-set-input :url %])}] :on-change-text #(re-frame/dispatch [:network-set-input :url %])}]
[react/text (i18n/label :t/network-chain)] [react/i18n-text {:key :network-chain}]
[react/view styles/network-type [react/view styles/network-type
[list/flat-list {:data [:mainnet :testnet :rinkeby] [list/flat-list {:data [:mainnet :testnet :rinkeby]
:key-fn (fn [_ i] (str i)) :key-fn (fn [_ i] (str i))

View File

@ -35,8 +35,8 @@
[react/text {:style st/connect-button-label [react/text {:style st/connect-button-label
:uppercase? true} :uppercase? true}
(i18n/label :t/connect)]] (i18n/label :t/connect)]]
[react/text {:style st/connect-button-description} [react/i18n-text {:style st/connect-button-description
(i18n/label :t/connecting-requires-login)]]]) :key :connecting-requires-login}]]])
[react/view st/network-config-container [react/view st/network-config-container
[react/text {:style st/network-config-text [react/text {:style st/network-config-text
:accessibility-label :network-details-text} :accessibility-label :network-details-text}

View File

@ -14,9 +14,7 @@
(defstyle badge-connected-text (defstyle badge-connected-text
{:color colors/gray {:color colors/gray
:ios {:margin-top 5 :ios {:margin-top 5}
:font-size 14
:letter-spacing -0.2}
:android {:font-size 13}}) :android {:font-size 13}})
(defstyle paste-json-text-input (defstyle paste-json-text-input
@ -46,9 +44,7 @@
(defstyle connect-button-description (defstyle connect-button-description
{:color colors/gray {:color colors/gray
:ios {:margin-top 8 :ios {:margin-top 8
:height 20 :height 20}
:font-size 14
:letter-spacing -0.2}
:android {:margin-top 12 :android {:margin-top 12
:font-size 12}}) :font-size 12}})

View File

@ -23,8 +23,8 @@
[react/text {:style styles/badge-name-text} [react/text {:style styles/badge-name-text}
(or name (i18n/label :t/new-network))] (or name (i18n/label :t/new-network))]
(when connected? (when connected?
[react/text {:style styles/badge-connected-text} [react/i18n-text {:style styles/badge-connected-text
(i18n/label :t/connected)])]]) :key :connected}])]])
(def mainnet? (def mainnet?
#{"mainnet" "mainnet_rpc"}) #{"mainnet" "mainnet_rpc"})

View File

@ -58,7 +58,6 @@
(defstyle settings-item-text (defstyle settings-item-text
{:flex-wrap :nowrap {:flex-wrap :nowrap
:font-size 15 :font-size 15
:ios {:letter-spacing -0.2}
:android {:color colors/black}}) :android {:color colors/black}})
(def settings-item-destructive (def settings-item-destructive

View File

@ -91,8 +91,7 @@
(defn settings-switch-item [{:keys [label-kw value action-fn active?] :or {active? true}}] (defn settings-switch-item [{:keys [label-kw value action-fn active?] :or {active? true}}]
[react/view styles/settings-item [react/view styles/settings-item
[react/view styles/settings-item-text-wrapper [react/view styles/settings-item-text-wrapper
[react/text {:style styles/settings-item-text} [react/i18n-text {:style styles/settings-item-text :key label-kw}]]
(i18n/label label-kw)]]
[react/switch {:on-tint-color colors/blue [react/switch {:on-tint-color colors/blue
:value value :value value
:on-value-change action-fn :on-value-change action-fn

View File

@ -19,9 +19,7 @@
(def intro-description (def intro-description
{:margin-top 8 {:margin-top 8
:font-size 14
:line-height 21 :line-height 21
:letter-spacing -0.2
:text-align :center :text-align :center
:color colors/gray}) :color colors/gray})

View File

@ -38,10 +38,10 @@
[react/view {:style styles/intro-container} [react/view {:style styles/intro-container}
[components.common/image-contain {:container-style styles/intro-image} [components.common/image-contain {:container-style styles/intro-image}
(:lock resources/ui)] (:lock resources/ui)]
[react/text {:style styles/intro-text} [react/i18n-text {:style styles/intro-text
(i18n/label :t/your-data-belongs-to-you)] :key :your-data-belongs-to-you}]
[react/text {:style styles/intro-description} [react/i18n-text {:style styles/intro-description
(i18n/label :t/your-data-belongs-to-you-description)] :key :your-data-belongs-to-you-description}]
[components.common/button {:button-style styles/intro-button [components.common/button {:button-style styles/intro-button
:on-press #(re-frame/dispatch [:set-in [:my-profile/seed :step] :12-words]) :on-press #(re-frame/dispatch [:set-in [:my-profile/seed :step] :12-words])
:label (i18n/label :t/ok-continue)}]]) :label (i18n/label :t/ok-continue)}]])

View File

@ -44,8 +44,6 @@
:margin-bottom (scaled-y 26) :margin-bottom (scaled-y 26)
:margin-left 34 :margin-left 34
:margin-right 34 :margin-right 34
:font-size 14
:letter-spacing -0.2
:text-align :center :text-align :center
:color colors/gray}) :color colors/gray})

View File

@ -17,11 +17,11 @@
[react/view {:style styles/image-container} [react/view {:style styles/image-container}
[react/image {:source (:analytics-image resources/ui) [react/image {:source (:analytics-image resources/ui)
:style styles/usage-data-image}]] :style styles/usage-data-image}]]
[react/text {:style styles/help-improve-text} [react/i18n-text {:style styles/help-improve-text
(i18n/label :t/help-improve)] :key :help-improve}]
[react/view [react/view
[react/text {:style styles/help-improve-text-description} [react/i18n-text {:style styles/help-improve-text-description
(i18n/label :t/help-improve-description)]] :key :help-improve-description}]]
[react/text {:style styles/learn-what-we-collect-link [react/text {:style styles/learn-what-we-collect-link
:on-press #(.openURL react/linking "https://wiki.status.im/Help_Improve_Status#Help_Improve_Status")} :on-press #(.openURL react/linking "https://wiki.status.im/Help_Improve_Status#Help_Improve_Status")}
(i18n/label :t/learn-what-we-collect-link)]] (i18n/label :t/learn-what-we-collect-link)]]

View File

@ -33,9 +33,7 @@
(defstyle label (defstyle label
{:color :white {:color :white
:ios {:font-size 14 :ios {:line-height 16}
:line-height 16
:letter-spacing -0.2}
:android {:font-size 12}}) :android {:font-size 12}})
(def amount-text-input-container (def amount-text-input-container

View File

@ -27,8 +27,7 @@
(defn view-asset [symbol] (defn view-asset [symbol]
[react/view [react/view
[react/text {:style styles/label} [react/i18n-text {:style styles/label :key :wallet-asset}]
(i18n/label :t/wallet-asset)]
[react/view styles/asset-container-read-only [react/view styles/asset-container-read-only
[react/text {:style styles/asset-text} [react/text {:style styles/asset-text}
(name symbol)]]]) (name symbol)]]])

View File

@ -25,7 +25,6 @@
(def transaction-sent-description (def transaction-sent-description
{:color :white {:color :white
:opacity 0.6 :opacity 0.6
:font-size 14
:text-align :center :text-align :center
:padding-horizontal 16}) :padding-horizontal 16})

View File

@ -23,7 +23,8 @@
:accessibility-label :transaction-sent-text} :accessibility-label :transaction-sent-text}
(i18n/label :t/transaction-sent)] (i18n/label :t/transaction-sent)]
[react/view styles/gap] [react/view styles/gap]
[react/text {:style styles/transaction-sent-description} (i18n/label :t/transaction-description)]] [react/i18n-text {:style styles/transaction-sent-description
:key :transaction-description}]]
[react/view components.styles/flex] [react/view components.styles/flex]
[components/separator] [components/separator]
[react/touchable-highlight {:on-press #(re-frame/dispatch [:close-transaction-sent-screen chat-id]) [react/touchable-highlight {:on-press #(re-frame/dispatch [:close-transaction-sent-screen chat-id])

View File

@ -44,7 +44,7 @@
[react/text {:style styles/signing-phrase [react/text {:style styles/signing-phrase
:accessibility-label :signing-phrase-text} :accessibility-label :signing-phrase-text}
signing-phrase]] signing-phrase]]
[react/text {:style styles/signing-phrase-description} (i18n/label message-label)] [react/i18n-text {:style styles/signing-phrase-description :key message-label}]
[react/view styles/password-container [react/view styles/password-container
[react/text-input [react/text-input
{:auto-focus true {:auto-focus true
@ -158,8 +158,8 @@
[react/view styles/transaction-fee-info-icon [react/view styles/transaction-fee-info-icon
[react/text {:style styles/transaction-fee-info-icon-text} "?"]] [react/text {:style styles/transaction-fee-info-icon-text} "?"]]
[react/view styles/transaction-fee-info-text-wrapper [react/view styles/transaction-fee-info-text-wrapper
[react/text {:style styles/advanced-fees-text} [react/i18n-text {:style styles/advanced-fees-text
(i18n/label :t/wallet-transaction-fee-details)]]] :key :wallet-transaction-fee-details}]]]
[components/separator] [components/separator]
[react/view styles/transaction-fee-block-wrapper [react/view styles/transaction-fee-block-wrapper
[wallet.components/cartouche {:disabled? true} [wallet.components/cartouche {:disabled? true}
@ -207,8 +207,9 @@
[react/view {:style styles/advanced-button-wrapper} [react/view {:style styles/advanced-button-wrapper}
[react/view {:style styles/advanced-button [react/view {:style styles/advanced-button
:accessibility-label :advanced-button} :accessibility-label :advanced-button}
[react/text {:style (merge wallet.components.styles/label styles/advanced-label)} [react/i18n-text {:style (merge wallet.components.styles/label
(i18n/label :t/wallet-advanced)] styles/advanced-label)
:key :wallet-advanced}]
[vector-icons/icon (if advanced? :icons/up :icons/down) {:color :white}]]]] [vector-icons/icon (if advanced? :icons/up :icons/down) {:color :white}]]]]
(when advanced? (when advanced?
[advanced-cartouche transaction modal?])]) [advanced-cartouche transaction modal?])])
@ -278,7 +279,8 @@
[status-bar/status-bar {:type :modal-wallet}] [status-bar/status-bar {:type :modal-wallet}]
[toolbar false false act/close-white [toolbar false false act/close-white
(i18n/label :t/send-transaction)] (i18n/label :t/send-transaction)]
[react/text {:style styles/empty-text} (i18n/label :t/unsigned-transaction-expired)]]]))) [react/i18n-text {:style styles/empty-text
:key :unsigned-transaction-expired}]]])))
(defview sign-message-modal [] (defview sign-message-modal []
(letsubs [{:keys [data in-progress?]} [:wallet.send/unsigned-transaction]] (letsubs [{:keys [data in-progress?]} [:wallet.send/unsigned-transaction]]

View File

@ -100,8 +100,7 @@
:color colors/white}) :color colors/white})
(def backup-seed-phrase-description (def backup-seed-phrase-description
{:font-size 14 {:line-height 20
:line-height 20
:color colors/white-lighter-transparent}) :color colors/white-lighter-transparent})
(def total-balance-container (def total-balance-container
@ -116,8 +115,7 @@
:color colors/white}) :color colors/white})
(def total-value (def total-value
{:font-size 14 {:color colors/white-transparent})
:color colors/white-transparent})
(defstyle total-balance-currency (defstyle total-balance-currency
{:font-size 37 {:font-size 37

View File

@ -144,8 +144,7 @@
(def details-item-label (def details-item-label
{:flex 1 {:flex 1
:margin-right 10 :margin-right 10
:color colors/gray :color colors/gray})
:font-size 14})
(def details-item-value-wrapper (def details-item-value-wrapper
{:flex 5}) {:flex 5})
@ -213,7 +212,6 @@
(def details-confirmations-helper-text (def details-confirmations-helper-text
{:color colors/gray {:color colors/gray
:font-size 14
:margin-vertical 2}) :margin-vertical 2})
(def details-separator (def details-separator

View File

@ -104,8 +104,8 @@
[list/section-list {:sections (map #(update-transactions % filter-data) transactions-history-list) [list/section-list {:sections (map #(update-transactions % filter-data) transactions-history-list)
:key-fn :hash :key-fn :hash
:render-fn #(render-transaction % network) :render-fn #(render-transaction % network)
:empty-component [react/text {:style styles/empty-text} :empty-component [react/i18n-text {:style styles/empty-text
(i18n/label :t/transactions-history-empty)] :key :transactions-history-empty}]
:on-refresh #(re-frame/dispatch [:update-transactions]) :on-refresh #(re-frame/dispatch [:update-transactions])
:refreshing false}]])) :refreshing false}]]))
@ -183,12 +183,12 @@
[react/view {:style styles/details-block} [react/view {:style styles/details-block}
[progress-bar confirmations-progress (failed? type)] [progress-bar confirmations-progress (failed? type)]
(if (failed? type) (if (failed? type)
[react/text {:style styles/details-failed} [react/i18n-text {:style styles/details-failed
(i18n/label :t/failed)] :key :failed}]
[react/text {:style styles/details-confirmations-count} [react/text {:style styles/details-confirmations-count}
(str confirmations " " (i18n/label :t/confirmations))]) (str confirmations " " (i18n/label :t/confirmations))])
[react/text {:style styles/details-confirmations-helper-text} [react/i18n-text {:style styles/details-confirmations-helper-text
(i18n/label :t/confirmations-helper-text)]]) :key :confirmations-helper-text}]])
(defn details-list-row (defn details-list-row
([label props-value] ([label props-value]
@ -201,7 +201,7 @@
[nil extra-props-value] [nil extra-props-value]
extra-props-value)] extra-props-value)]
[react/view {:style styles/details-row} [react/view {:style styles/details-row}
[react/text {:style styles/details-item-label} (i18n/label label)] [react/i18n-text {:style styles/details-item-label :key label}]
[react/view {:style styles/details-item-value-wrapper} [react/view {:style styles/details-item-value-wrapper}
[react/text (merge {:style styles/details-item-value} props) [react/text (merge {:style styles/details-item-value} props)
(str (or value "-"))] (str (or value "-"))]

View File

@ -36,17 +36,18 @@
[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}
(:code currency)]] (:code currency)]]
[react/text {:style styles/total-value} (i18n/label :t/wallet-total-value)]]]) [react/i18n-text {:style styles/total-value
:key :wallet-total-value}]]])
(defn- backup-seed-phrase [] (defn- backup-seed-phrase []
[react/view styles/section [react/view styles/section
[react/touchable-highlight {:on-press #(re-frame/dispatch [:navigate-to :backup-seed])} [react/touchable-highlight {:on-press #(re-frame/dispatch [:navigate-to :backup-seed])}
[react/view styles/backup-seed-phrase-container [react/view styles/backup-seed-phrase-container
[react/view styles/backup-seed-phrase-text-container [react/view styles/backup-seed-phrase-text-container
[react/text {:style styles/backup-seed-phrase-title} [react/i18n-text {:style styles/backup-seed-phrase-title
(i18n/label :t/wallet-backup-recovery-title)] :key :wallet-backup-recovery-title}]
[react/text {:style styles/backup-seed-phrase-description} [react/i18n-text {:style styles/backup-seed-phrase-description
(i18n/label :t/wallet-backup-recovery-description)]] :key :wallet-backup-recovery-description}]]
[vector-icons/icon :icons/forward {:color :white}]]]]) [vector-icons/icon :icons/forward {:color :white}]]]])
(def actions (def actions