Fix adv settings clicks, some styling changes

This commit is contained in:
Vitaliy Vlasov 2018-08-01 00:38:10 -06:00
parent 1dd9591b5e
commit 7c2c537a1a
No known key found for this signature in database
GPG Key ID: A7D57C347F2B2964
2 changed files with 12 additions and 7 deletions

View File

@ -16,14 +16,19 @@
:height 56
:align-self :stretch
:align-items :center
:background-color (if active? colors/gray-lighter colors/white)
:margin-top 20})
:background-color (if active? colors/gray-lighter colors/white)})
(defn profile-row-text [color active?]
{:color color
:font-weight (if active? "600" :normal)
:font-size 16})
(def adv-settings
{:justify-content :space-between
:flex-direction :row
:align-items :center
:flex 1})
(def profile-photo
{:border-radius 100
:width 100
@ -40,7 +45,7 @@
:height 45
:width 240
:margin-horizontal 50
:margin-bottom 20
:margin-bottom 48
:border-radius 8
:background-color (colors/alpha colors/blue 0.1)})

View File

@ -86,10 +86,10 @@
[react/view styles/profile-view
[profile-badge user]
[share-contact-code]
[react/view {:style (styles/profile-row adv-settings-open?)}
[react/touchable-highlight {:on-press #(re-frame/dispatch [:navigate-to (if adv-settings-open? :home :advanced-settings)])}
[react/text {:style (styles/profile-row-text colors/black adv-settings-open?)} (i18n/label :t/advanced-settings)]]
[react/touchable-highlight {:on-press #(re-frame/dispatch [:navigate-to (if adv-settings-open? :intro :home)])}
[react/touchable-highlight {:style (styles/profile-row adv-settings-open?)
:on-press #(re-frame/dispatch [:navigate-to (if adv-settings-open? :home :advanced-settings)])}
[react/view {:style styles/adv-settings}
[react/text {:style (styles/profile-row-text colors/black adv-settings-open?)} (i18n/label :t/advanced-settings)]
[vector-icons/icon :icons/forward {:style {:tint-color colors/gray}}]]]
[react/view {:style (styles/profile-row false)}
[react/touchable-highlight {:on-press #(re-frame/dispatch [:logout])}