Allow 2 lines for user name on intro screen
Add max-height to scroll-view Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
This commit is contained in:
parent
6a9eef1c2a
commit
87ce82e10a
|
@ -54,11 +54,17 @@
|
||||||
(defn list-item [selected?]
|
(defn list-item [selected?]
|
||||||
{:flex-direction :row
|
{:flex-direction :row
|
||||||
:align-items :center
|
:align-items :center
|
||||||
|
:justify-content :space-between
|
||||||
:padding-left 16
|
:padding-left 16
|
||||||
:padding-right 10
|
:padding-right 10
|
||||||
:background-color (if selected? colors/blue-light colors/white)
|
:background-color (if selected? colors/blue-light colors/white)
|
||||||
:padding-vertical 12})
|
:padding-vertical 12})
|
||||||
|
|
||||||
|
(def list-item-body
|
||||||
|
{:flex-direction :row
|
||||||
|
:flex 1
|
||||||
|
:align-items :flex-start})
|
||||||
|
|
||||||
(def multiaccount-image
|
(def multiaccount-image
|
||||||
{:width 40
|
{:width 40
|
||||||
:height 40
|
:height 40
|
||||||
|
|
|
@ -119,40 +119,40 @@
|
||||||
:resize-mode :contain
|
:resize-mode :contain
|
||||||
:style {:width image-size :height image-size}}])])))
|
:style {:width image-size :height image-size}}])])))
|
||||||
|
|
||||||
(defn choose-key [{:keys [multiaccounts selected-id view-height]}]
|
(defn choose-key [{:keys [multiaccounts selected-id]}]
|
||||||
[react/view
|
[react/view
|
||||||
{:style {:flex 1
|
{:style {:flex 1
|
||||||
:justify-content :center}}
|
:justify-content :center}}
|
||||||
[react/view
|
[react/scroll-view
|
||||||
{:style {:flex 1
|
{:style {:max-height 410}
|
||||||
:height 200
|
:content-container-style {:justify-content :flex-start}}
|
||||||
:max-height 338}}
|
(for [[acc accessibility-n] (map vector multiaccounts (range (count multiaccounts)))]
|
||||||
[react/scroll-view
|
(let [selected? (= (:id acc) selected-id)
|
||||||
{:content-container-style {:justify-content :flex-start}}
|
public-key (get-in acc [:derived constants/path-whisper-keyword :public-key])]
|
||||||
(for [[acc accessibility-n] (map vector multiaccounts (range (count multiaccounts)))]
|
^{:key public-key}
|
||||||
(let [selected? (= (:id acc) selected-id)
|
[react/touchable-highlight
|
||||||
public-key (get-in acc [:derived constants/path-whisper-keyword :public-key])]
|
{:accessibility-label (keyword (str "select-account-button-" accessibility-n))
|
||||||
^{:key public-key}
|
:on-press #(re-frame/dispatch [:intro-wizard/on-key-selected (:id acc)])}
|
||||||
[react/touchable-highlight
|
[react/view {:style (styles/list-item selected?)}
|
||||||
{:accessibility-label (keyword (str "select-account-button-" accessibility-n))
|
[react/view {:style styles/list-item-body}
|
||||||
:on-press #(re-frame/dispatch [:intro-wizard/on-key-selected (:id acc)])}
|
|
||||||
[react/view {:style (styles/list-item selected?)}
|
|
||||||
|
|
||||||
[react/image {:source {:uri (identicon/identicon public-key)}
|
[react/image {:source {:uri (identicon/identicon public-key)}
|
||||||
:resize-mode :cover
|
:resize-mode :cover
|
||||||
:style styles/multiaccount-image}]
|
:style styles/multiaccount-image}]
|
||||||
[react/view {:style {:margin-horizontal 16 :flex 1 :justify-content :space-between}}
|
[react/view {:style {:padding-horizontal 16
|
||||||
[react/text {:style (assoc styles/wizard-text :text-align :left
|
:flex 1}}
|
||||||
:color colors/black
|
[react/text {:style (assoc styles/wizard-text :text-align :left
|
||||||
:font-weight "500")
|
:color colors/black
|
||||||
:number-of-lines 1
|
:line-height 22
|
||||||
:ellipsize-mode :middle}
|
:font-weight "500")
|
||||||
|
:number-of-lines 2
|
||||||
|
:ellipsize-mode :middle}
|
||||||
(gfy/generate-gfy public-key)]
|
(gfy/generate-gfy public-key)]
|
||||||
[react/text {:style (assoc styles/wizard-text
|
[react/text {:style (assoc styles/wizard-text
|
||||||
:text-align :left
|
:text-align :left
|
||||||
|
:line-height 22
|
||||||
:font-family "monospace")}
|
:font-family "monospace")}
|
||||||
(utils/get-shortened-address public-key)]]
|
(utils/get-shortened-address public-key)]]]
|
||||||
[radio/radio selected?]]]))]]])
|
[radio/radio selected?]]]))]])
|
||||||
|
|
||||||
(defn storage-entry [{:keys [type icon icon-width icon-height
|
(defn storage-entry [{:keys [type icon icon-width icon-height
|
||||||
image image-selected image-width image-height
|
image image-selected image-width image-height
|
||||||
|
|
Loading…
Reference in New Issue