Skip to content

Commit

Permalink
Allow 2 lines for user name on intro screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferossgp committed Jan 28, 2020
1 parent 60af04f commit e3adb68
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 21 deletions.
6 changes: 6 additions & 0 deletions src/status_im/ui/screens/intro/styles.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,17 @@
(defn list-item [selected?]
{:flex-direction :row
:align-items :center
:justify-content :space-between
:padding-left 16
:padding-right 10
:background-color (if selected? colors/blue-light colors/white)
:padding-vertical 12})

(def list-item-body
{:flex-direction :row
:flex 1
:align-items :flex-start})

(def multiaccount-image
{:width 40
:height 40
Expand Down
43 changes: 22 additions & 21 deletions src/status_im/ui/screens/intro/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -119,39 +119,40 @@
:resize-mode :contain
: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
{:style {:flex 1
:justify-content :center}}
[react/view
{:style {:flex 1
:height 200
:max-height 338}}
{:style {:height 410}}
[react/scroll-view
{:content-container-style {:justify-content :flex-start}}
(for [[acc accessibility-n] (map vector multiaccounts (range (count multiaccounts)))]
(let [selected? (= (:id acc) selected-id)
(let [selected? (= (:id acc) selected-id)
public-key (get-in acc [:derived constants/path-whisper-keyword :publicKey])]
^{:key public-key}
[react/touchable-highlight
{:accessibility-label (keyword (str "select-account-button-" accessibility-n))
:on-press #(re-frame/dispatch [:intro-wizard/on-key-selected (:id acc)])}
: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)}
:resize-mode :cover
:style styles/multiaccount-image}]
[react/view {:style {:margin-horizontal 16 :flex 1 :justify-content :space-between}}
[react/text {:style (assoc styles/wizard-text :text-align :left
:color colors/black
:font-weight "500")
:number-of-lines 1
:ellipsize-mode :middle}
(gfy/generate-gfy public-key)]
[react/text {:style (assoc styles/wizard-text
:text-align :left
:font-family "monospace")}
(utils/get-shortened-address public-key)]]
[react/view {:style styles/list-item-body}
[react/image {:source {:uri (identicon/identicon public-key)}
:resize-mode :cover
:style styles/multiaccount-image}]
[react/view {:style {:padding-horizontal 16
:flex 1}}
[react/text {:style (assoc styles/wizard-text :text-align :left
:color colors/black
:line-height 22
:font-weight "500")
:number-of-lines 2
:ellipsize-mode :middle}
(gfy/generate-gfy public-key)]
[react/text {:style (assoc styles/wizard-text
:text-align :left
:line-height 22
:font-family "monospace")}
(utils/get-shortened-address public-key)]]]
[radio/radio selected?]]]))]]])

(defn storage-entry [{:keys [type icon icon-width icon-height
Expand Down

0 comments on commit e3adb68

Please sign in to comment.