From 4a132094aea2d01dfa9a3c1607c9f115d71a0f7b Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Fri, 14 Oct 2016 19:33:58 +0300 Subject: [PATCH] fix #350 --- .../components/chat_icon/styles.cljs | 6 +- src/status_im/components/drawer/styles.cljs | 12 +-- src/status_im/profile/screen.cljs | 79 +++++++++---------- src/status_im/profile/styles.cljs | 17 ++-- 4 files changed, 53 insertions(+), 61 deletions(-) diff --git a/src/status_im/components/chat_icon/styles.cljs b/src/status_im/components/chat_icon/styles.cljs index 1a87a9ab88..5db9ecb21e 100644 --- a/src/status_im/components/chat_icon/styles.cljs +++ b/src/status_im/components/chat_icon/styles.cljs @@ -111,9 +111,9 @@ (def online-dot-right (merge online-dot {:left 10})) (def photo-pencil - {:margin-left 5 - :margin-right 5 - :margin-top 3 + {:margin-left 8 + :margin-right 2 + :margin-top 6 :font-size 12 :color :white}) diff --git a/src/status_im/components/drawer/styles.cljs b/src/status_im/components/drawer/styles.cljs index 6478a9c023..60d6daa545 100644 --- a/src/status_im/components/drawer/styles.cljs +++ b/src/status_im/components/drawer/styles.cljs @@ -10,7 +10,8 @@ text1-color text2-color text3-color - color-red]])) + color-red]] + [status-im.utils.platform :as p])) (def drawer-menu {:flex 1 @@ -28,10 +29,10 @@ :height 64}) (def name-container - {:margin-top -16 + {:margin-top (if p/ios? -13 -19) :margin-bottom -16 - :margin-left 16 - :margin-right 16}) + :margin-left 16 + :margin-right 16}) (def name-input-wrapper {}) @@ -44,7 +45,7 @@ (def status-container {:margin-left 16 :margin-right 16 - :margin-top 4 + :margin-top (if p/ios? 5 5) :align-items :center}) (def status-input @@ -52,7 +53,6 @@ :height 56 :font-size 14 :padding-left 4 - :line-height 20 :text-align :center :text-align-vertical :top :color text2-color}) diff --git a/src/status_im/profile/screen.cljs b/src/status_im/profile/screen.cljs index 9dd10a5654..fd066e59b9 100644 --- a/src/status_im/profile/screen.cljs +++ b/src/status_im/profile/screen.cljs @@ -68,7 +68,7 @@ (map get-text))) (defn status-image-view [{{:keys [name status photo-path]} :account - edit? :edit?}] + edit? :edit?}] [view st/status-block [view st/user-photo-container (if edit? @@ -90,14 +90,13 @@ :wrapper-style st/username-wrapper :value name :on-change-text #(dispatch [:set-in [:profile-edit :name] %])}] - (if edit? - [text-input {:style st/status-input - :maxLength 140 - :editable edit? - :placeholder (label :t/profile-no-status) - :on-change-text #(dispatch [:set-in [:profile-edit :status] %]) - :default-value status}] - [text {:style st/status-text} (highlight-tags status)])]) + [text-input {:style st/status-input + :maxLength 140 + :multiline true + :editable edit? + :placeholder (label :t/profile-no-status) + :on-change-text #(dispatch [:set-in [:profile-edit :status] %]) + :default-value status}]]) (defview profile [] [{whisper-identity :whisper-identity @@ -163,42 +162,42 @@ [view [text {:style st/report-user-text} (label :t/report-user)]]]]]]) (defview my-profile [] - [edit? [:get-in [:profile-edit :edit?]] + [edit? [:get-in [:profile-edit :edit?]] current-account [:get-current-account] changed-account [:get :profile-edit]] - (let [{:keys [phone - address - public-key] :as account} (if edit? - changed-account - current-account)] - [scroll-view {:style st/profile - :keyboardShouldPersistTaps true} - [status-bar] - [toolbar {:account account - :edit? edit?}] + (let [{:keys [phone + address + public-key] :as account} (if edit? + changed-account + current-account)] + [scroll-view {:style st/profile + :keyboardShouldPersistTaps true} + [status-bar] + [toolbar {:account account + :edit? edit?}] - [status-image-view {:account account - :edit? edit?}] + [status-image-view {:account account + :edit? edit?}] - [scroll-view (merge st/profile-properties-container {:keyboardShouldPersistTaps true}) - [view st/profile-property - [selectable-field {:label (label :t/phone-number) - :value (if (and phone (not (str/blank? phone))) - (format-phone-number phone) - (label :t/not-specified))}] - [view st/underline-container]] + [scroll-view (merge st/profile-properties-container {:keyboardShouldPersistTaps true}) + [view st/profile-property + [selectable-field {:label (label :t/phone-number) + :value (if (and phone (not (str/blank? phone))) + (format-phone-number phone) + (label :t/not-specified))}] + [view st/underline-container]] - [view st/profile-property - [selectable-field {:label (label :t/address) - :value address}] - [view st/underline-container]] + [view st/profile-property + [selectable-field {:label (label :t/address) + :value address}] + [view st/underline-container]] - [view st/profile-property - [selectable-field {:label (label :t/public-key) - :value public-key}]] + [view st/profile-property + [selectable-field {:label (label :t/public-key) + :value public-key}]] - [view st/underline-container] + [view st/underline-container] - [view st/qr-code-container - [qr-code {:value (str "ethereum:" public-key) - :size 220}]]]])) \ No newline at end of file + [view st/qr-code-container + [qr-code {:value (str "ethereum:" public-key) + :size 220}]]]])) diff --git a/src/status_im/profile/styles.cljs b/src/status_im/profile/styles.cljs index af153b07c0..932ce7f98b 100644 --- a/src/status_im/profile/styles.cljs +++ b/src/status_im/profile/styles.cljs @@ -11,7 +11,8 @@ text1-color text1-disabled-color text2-color - color-red]])) + color-red]] + [status-im.utils.platform :as p])) (def profile {:flex 1 @@ -54,7 +55,7 @@ (def username-wrapper {:width 300 - :margin-top -22 + :margin-top (if p/ios? -18 -22) :margin-bottom -16}) (defn username-input [edit? valid?] @@ -76,20 +77,12 @@ {:align-self "stretch" :margin-left 16 :margin-right 16 - :height 40 - :margin-top 0 + :margin-top (if p/ios? 6 1) :font-size 14 - :line-height 20 + :min-height 60 :text-align :center :color text2-color}) -(def status-text - {:text-align :center - :margin-left 0 - :margin-right 0 - :margin-top 10 - :color text2-color}) - (def btns-container {:margin-top 18 :flex-direction :row})