Make addresses in the QR code and the contact screen copyable
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
3b8e2b7f75
commit
49dbfe1021
|
@ -68,10 +68,11 @@
|
||||||
(def footer
|
(def footer
|
||||||
{:flex-direction :row
|
{:flex-direction :row
|
||||||
:justify-content :center
|
:justify-content :center
|
||||||
:padding-top 22})
|
:padding-top 17})
|
||||||
|
|
||||||
(def wallet-info
|
(def wallet-info
|
||||||
{:align-items :center
|
{:flex-grow 1
|
||||||
|
:align-items :center
|
||||||
:padding-bottom 20})
|
:padding-bottom 20})
|
||||||
|
|
||||||
(def hash-value-type
|
(def hash-value-type
|
||||||
|
@ -80,6 +81,7 @@
|
||||||
|
|
||||||
(def hash-value-text
|
(def hash-value-text
|
||||||
{:color colors/black
|
{:color colors/black
|
||||||
|
:align-self :stretch
|
||||||
:margin-horizontal 60
|
:margin-horizontal 60
|
||||||
:text-align :center
|
:text-align :center
|
||||||
:font-size 15
|
:font-size 15
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
(:require [reagent.core :as reagent]
|
(:require [reagent.core :as reagent]
|
||||||
[status-im.react-native.js-dependencies :as rn-dependencies]
|
[status-im.react-native.js-dependencies :as rn-dependencies]
|
||||||
[status-im.ui.components.qr-code-viewer.styles :as styles]
|
[status-im.ui.components.qr-code-viewer.styles :as styles]
|
||||||
[status-im.ui.components.react :as react]))
|
[status-im.ui.components.react :as react]
|
||||||
|
[status-im.ui.components.text :as text]))
|
||||||
|
|
||||||
(defn qr-code [props]
|
(defn qr-code [props]
|
||||||
(reagent/create-element
|
(reagent/create-element
|
||||||
|
@ -12,9 +13,8 @@
|
||||||
(defn- footer [style value]
|
(defn- footer [style value]
|
||||||
[react/view styles/footer
|
[react/view styles/footer
|
||||||
[react/view styles/wallet-info
|
[react/view styles/wallet-info
|
||||||
[react/text {:style (merge styles/hash-value-text style)
|
[text/selectable-text {:value value
|
||||||
:accessibility-label :address-text}
|
:style (merge styles/hash-value-text style)}]]])
|
||||||
value]]])
|
|
||||||
|
|
||||||
(defn qr-code-viewer [{:keys [style hint-style footer-style]} value hint legend]
|
(defn qr-code-viewer [{:keys [style hint-style footer-style]} value hint legend]
|
||||||
{:pre [(not (nil? value))]}
|
{:pre [(not (nil? value))]}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
(ns status-im.ui.components.text
|
||||||
|
(:require [status-im.ui.components.react :as react]
|
||||||
|
[status-im.utils.platform :as platform]))
|
||||||
|
|
||||||
|
(defn- selectable-text [{:keys [value style]}]
|
||||||
|
(if platform/ios?
|
||||||
|
[react/text-input {:value value
|
||||||
|
:editable false
|
||||||
|
:multiline true
|
||||||
|
:style style}]
|
||||||
|
[react/text {:style style
|
||||||
|
:accessibility-label :address-text
|
||||||
|
:selectable true}
|
||||||
|
value]))
|
|
@ -54,4 +54,3 @@
|
||||||
(defstyle contact-profile-info-container
|
(defstyle contact-profile-info-container
|
||||||
{:padding-top 26
|
{:padding-top 26
|
||||||
:background-color colors/white})
|
:background-color colors/white})
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
[re-frame.core :as re-frame]
|
[re-frame.core :as re-frame]
|
||||||
[status-im.utils.contacts :as utils.contacts]
|
[status-im.utils.contacts :as utils.contacts]
|
||||||
[status-im.ui.components.toolbar.view :as toolbar]
|
[status-im.ui.components.toolbar.view :as toolbar]
|
||||||
[status-im.ui.components.list.views :as list]))
|
[status-im.ui.components.list.views :as list]
|
||||||
|
[status-im.ui.components.text :as text]))
|
||||||
|
|
||||||
(defn profile-contact-toolbar []
|
(defn profile-contact-toolbar []
|
||||||
[toolbar/toolbar {}
|
[toolbar/toolbar {}
|
||||||
|
@ -42,9 +43,8 @@
|
||||||
[react/text {:style styles/profile-info-title}
|
[react/text {:style styles/profile-info-title}
|
||||||
label]
|
label]
|
||||||
[react/view styles/profile-setting-spacing]
|
[react/view styles/profile-setting-spacing]
|
||||||
[react/text {:style styles/profile-setting-text
|
[text/selectable-text {:value value
|
||||||
:accessibility-label accessibility-label}
|
:style styles/profile-setting-text}]]])
|
||||||
value]]])
|
|
||||||
|
|
||||||
(defn profile-info-contact-code-item [whisper-identity]
|
(defn profile-info-contact-code-item [whisper-identity]
|
||||||
[profile-info-item
|
[profile-info-item
|
||||||
|
|
Loading…
Reference in New Issue