diff --git a/src/status_im/ui/screens/desktop/main/tabs/profile/styles.cljs b/src/status_im/ui/screens/desktop/main/tabs/profile/styles.cljs index c288c1273a..26c191c159 100644 --- a/src/status_im/ui/screens/desktop/main/tabs/profile/styles.cljs +++ b/src/status_im/ui/screens/desktop/main/tabs/profile/styles.cljs @@ -9,16 +9,20 @@ :align-items :center :margin-bottom 16}) -(def profile-row - {:justify-content :space-between - :flex-direction :row - :margin-horizontal 24 - :align-self :stretch - :margin-top 40}) +(defn profile-row [active?] + {:justify-content :space-between + :flex-direction :row + :padding-horizontal 24 + :height 56 + :align-self :stretch + :align-items :center + :background-color (if active? colors/gray-lighter colors/white) + :margin-top 20}) -(defn profile-row-text [color] - {:color color - :font-size 16}) +(defn profile-row-text [color active?] + {:color color + :font-weight (if active? "600" :normal) + :font-size 16}) (def profile-photo {:border-radius 100 @@ -138,7 +142,7 @@ (def advanced-settings-title {:margin 24 :font-size 20 - :font-weight "600"}) + :font-weight "600"}) (def title-separator {:height 1 diff --git a/src/status_im/ui/screens/desktop/main/tabs/profile/views.cljs b/src/status_im/ui/screens/desktop/main/tabs/profile/views.cljs index b18d175300..e84efbd4b1 100644 --- a/src/status_im/ui/screens/desktop/main/tabs/profile/views.cljs +++ b/src/status_im/ui/screens/desktop/main/tabs/profile/views.cljs @@ -81,17 +81,20 @@ [vector-icons/icon :icons/qr {:style {:tint-color colors/blue}}]]]]) (views/defview profile [user] - [react/view styles/profile-view - [profile-badge user] - [share-contact-code] - [react/view {:style styles/profile-row} - [react/touchable-highlight {:on-press #(re-frame/dispatch [:navigate-to :advanced-settings])} - [react/text {:style (styles/profile-row-text colors/black)} (i18n/label :t/advanced-settings)]] - [vector-icons/icon :icons/forward {:style {:tint-color colors/gray}}]] - [react/view {:style styles/profile-row} - [react/touchable-highlight {:on-press #(re-frame/dispatch [:logout])} - [react/text {:style (styles/profile-row-text colors/red)} (i18n/label :t/logout)]] - [react/view [react/text {:style (styles/profile-row-text colors/gray)} "V" build/version " (" build/commit-sha ")"]]]]) + (views/letsubs [current-view-id [:get :view-id]] + (let [adv-settings-open? (= current-view-id :advanced-settings)] + [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)])} + [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])} + [react/text {:style (styles/profile-row-text colors/red false)} (i18n/label :t/logout)]] + [react/view [react/text {:style (styles/profile-row-text colors/gray false)} "V" build/version " (" build/commit-sha ")"]]]]))) (views/defview profile-data [] (views/letsubs