diff --git a/android/app/src/main/res/drawable-hdpi/icon_scan_white.png b/android/app/src/main/res/drawable-hdpi/icon_scan_white.png new file mode 100644 index 0000000000..a9496cb185 Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/icon_scan_white.png differ diff --git a/android/app/src/main/res/drawable-mdpi/icon_scan_white.png b/android/app/src/main/res/drawable-mdpi/icon_scan_white.png new file mode 100644 index 0000000000..e1fe0fe57b Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/icon_scan_white.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/icon_scan_white.png b/android/app/src/main/res/drawable-xhdpi/icon_scan_white.png new file mode 100644 index 0000000000..ad6ad72070 Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/icon_scan_white.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/icon_scan_white.png b/android/app/src/main/res/drawable-xxhdpi/icon_scan_white.png new file mode 100644 index 0000000000..9aeeecba40 Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/icon_scan_white.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/icon_scan_white.png b/android/app/src/main/res/drawable-xxxhdpi/icon_scan_white.png new file mode 100644 index 0000000000..8011c4a64d Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/icon_scan_white.png differ diff --git a/src/status_im/components/text_field/view.cljs b/src/status_im/components/text_field/view.cljs index f3757ac1bc..21ca793111 100644 --- a/src/status_im/components/text_field/view.cljs +++ b/src/status_im/components/text_field/view.cljs @@ -18,7 +18,7 @@ (def config {:label-top 16 :label-bottom 37 :label-font-large 16 - :label-font-small 12 + :label-font-small 13 :label-animation-duration 200}) (def default-props {:wrapperStyle {} diff --git a/src/status_im/contacts/views/new_contact.cljs b/src/status_im/contacts/views/new_contact.cljs index 2dbe6abc82..c0158168d1 100644 --- a/src/status_im/contacts/views/new_contact.cljs +++ b/src/status_im/contacts/views/new_contact.cljs @@ -57,7 +57,8 @@ :wrapperStyle (merge button-input) :label (label :t/address) :onChangeText #(dispatch [:set-in [:new-contact :whisper-identity] %])}] - [scan-button #(dispatch [:scan-qr-code {:toolbar-title (label :t/new-contact)} :set-new-contact-from-qr])]])) + [scan-button {:showLabel (zero? (count whisper-identity)) + :handler #(dispatch [:scan-qr-code {:toolbar-title (label :t/new-contact)} :set-new-contact-from-qr])}]])) (defview new-contact [] [{:keys [name whisper-identity phone-number] :as new-contact} [:get :new-contact]] diff --git a/src/status_im/login/screen.cljs b/src/status_im/login/screen.cljs index eef2ff99cc..c9de6ac25a 100644 --- a/src/status_im/login/screen.cljs +++ b/src/status_im/login/screen.cljs @@ -8,6 +8,7 @@ linear-gradient touchable-highlight]] [status-im.components.toolbar :refer [toolbar]] + [status-im.components.text-field.view :refer [text-field]] [status-im.components.styles :refer [color-purple color-white icon-search @@ -19,7 +20,7 @@ button-input-container button-input white-form-text-input]] - [status-im.qr-scanner.views.import-button :refer [import-button]] + [status-im.qr-scanner.views.scan-button :refer [scan-button]] [status-im.i18n :refer [label]] [status-im.login.styles :as st])) @@ -30,26 +31,27 @@ (defview address-input [address] [view button-input-container - [text-input - {:underlineColorAndroid color-white - :placeholderTextColor color-white - :style (merge white-form-text-input button-input) - :autoFocus true - :placeholder (label :t/address) - :onChangeText #(dispatch [:set-in [:login :address] %])} - address] - [import-button #(dispatch [:scan-qr-code {:toolbar-title (label :t/login)} :set-address-from-qr])]]) + [text-field + {:value address + :label (label :t/address) + :labelColor "#ffffff80" + :lineColor :white + :inputStyle st/input-style + :wrapperStyle (merge button-input st/address-input-wrapper) + :onChangeText #(dispatch [:set-in [:login :address] %])}] + [scan-button {:labelStyle st/scan-label + :icon :icon_scan_white + :showLabel (zero? (count address)) + :handler #(dispatch [:scan-qr-code {:toolbar-title (label :t/login)} :set-address-from-qr])}]]) (defview password-input [] - [] - [text-input - {:underlineColorAndroid color-white - :placeholderTextColor color-white - :style white-form-text-input - :autoFocus true - :placeholder (label :t/password) - :onChangeText #(dispatch [:set-in [:login :password] %])} - ""]) + [text-field + {:value "" + :label (label :t/password) + :labelColor "#ffffff80" + :lineColor :white + :inputStyle st/input-style + :onChangeText #(dispatch [:set-in [:login :password] %])}]) (defview login [] [{:keys [address password]} [:get :login]] diff --git a/src/status_im/login/styles.cljs b/src/status_im/login/styles.cljs index 677c3e7799..8278790c11 100644 --- a/src/status_im/login/styles.cljs +++ b/src/status_im/login/styles.cljs @@ -51,4 +51,14 @@ (def connect-button-text {:color "#7099e6" - :fontSize 16}) \ No newline at end of file + :fontSize 16}) + +(def input-style + {:color :white + :font-size 12}) + +(def scan-label + {:color :white}) + +(def address-input-wrapper + {}) \ No newline at end of file diff --git a/src/status_im/qr_scanner/views/scan-button.cljs b/src/status_im/qr_scanner/views/scan-button.cljs index 9ed1fd39e5..81dae39990 100644 --- a/src/status_im/qr_scanner/views/scan-button.cljs +++ b/src/status_im/qr_scanner/views/scan-button.cljs @@ -12,12 +12,13 @@ [status-im.qr-scanner.styles :as st])) -(defview scan-button [handler] - [] - [view st/scan-button - [touchable-highlight - {:on-press handler} - [view st/scan-button-content - [image {:source {:uri :scan_blue} - :style icon-scan}] - [text {:style st/scan-text} (label :t/scan-qr)]]]]) \ No newline at end of file +(defview scan-button [{:keys [showLabel icon labelStyle handler]}] + (let [showLabel (if (nil? showLabel) true showLabel)] + [view st/scan-button + [touchable-highlight + {:on-press handler} + [view st/scan-button-content + [image {:source {:uri (or icon :scan_blue)} + :style icon-scan}] + (when showLabel [text {:style (merge st/scan-text labelStyle)} + (label :t/scan-qr)])]]])) \ No newline at end of file