From 3819a0e8e527a76f8d4e5f76e872de4d7eb5aade Mon Sep 17 00:00:00 2001 From: Alexander Pantyuhov Date: Tue, 8 Nov 2016 13:56:36 +0300 Subject: [PATCH] Show QR in profile (#422) --- .../main/res/drawable-hdpi/icon_qr_gray.png | Bin 0 -> 2753 bytes .../src/main/res/drawable-mdpi/icon_qr.png | Bin 422 -> 826 bytes .../main/res/drawable-mdpi/icon_qr_gray.png | Bin 0 -> 1928 bytes .../main/res/drawable-xhdpi/icon_qr_gray.png | Bin 0 -> 3559 bytes .../main/res/drawable-xxhdpi/icon_qr_gray.png | Bin 0 -> 5241 bytes .../res/drawable-xxxhdpi/icon_qr_gray.png | Bin 0 -> 917 bytes .../icon_qr_gray.imageset/Contents.json | 21 +++++++++++ .../icon_qr_gray.imageset/icon_qr_gray.png | Bin 0 -> 5241 bytes src/status_im/accounts/login/screen.cljs | 1 - .../components/image_button/styles.cljs | 28 +++++++++++++++ .../components/image_button/view.cljs | 31 ++++++++++++++++ .../components/selectable_field/styles.cljs | 6 ++-- src/status_im/contacts/views/new_contact.cljs | 10 +++--- src/status_im/group_settings/screen.cljs | 2 +- src/status_im/profile/screen.cljs | 34 ++++++++++++++---- src/status_im/profile/styles.cljs | 24 +++++++++++-- src/status_im/qr_scanner/styles.cljs | 22 ------------ .../qr_scanner/views/import_button.cljs | 21 ----------- .../qr_scanner/views/scan_button.cljs | 22 ------------ src/status_im/translations/en.cljs | 1 + 20 files changed, 138 insertions(+), 85 deletions(-) create mode 100644 android/app/src/main/res/drawable-hdpi/icon_qr_gray.png create mode 100644 android/app/src/main/res/drawable-mdpi/icon_qr_gray.png create mode 100644 android/app/src/main/res/drawable-xhdpi/icon_qr_gray.png create mode 100644 android/app/src/main/res/drawable-xxhdpi/icon_qr_gray.png create mode 100644 android/app/src/main/res/drawable-xxxhdpi/icon_qr_gray.png create mode 100644 ios/StatusIm/Images.xcassets/icon_qr_gray.imageset/Contents.json create mode 100644 ios/StatusIm/Images.xcassets/icon_qr_gray.imageset/icon_qr_gray.png create mode 100644 src/status_im/components/image_button/styles.cljs create mode 100644 src/status_im/components/image_button/view.cljs delete mode 100644 src/status_im/qr_scanner/views/import_button.cljs delete mode 100644 src/status_im/qr_scanner/views/scan_button.cljs diff --git a/android/app/src/main/res/drawable-hdpi/icon_qr_gray.png b/android/app/src/main/res/drawable-hdpi/icon_qr_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..ce7a826d0d9f80ffbf7a7734851555e5ee1c9334 GIT binary patch literal 2753 zcmY*bc|6oxAO5+DX@(+1MAlHu3@sQ-WgRliFxj#V21Ax%Y$I8+ZI z4U%lxC3TCL2$e|Tj_!T$`@ZM%Ip_O5&w0-Ce810RZ4NM(SIzqcnR; zfw86 z01)=iZ^dY_5BB*ZZ36)SBCtC-0BXJn0C3n6ur?$clqtg1&j*Tg^K-#NLw)?&Yyi*- zMX*yJJP9Wm>T}sQ5D}^^{hNVc=esaWTJkrAOGa+S1ayM*oh#>m(7}|Lf!%_)lBx24TA=Fcl~q z_OCYks@5)wFb^Q$+0MKAIx1Sfng56Vu3Bo$|H- z02(sZKaaK9ch~yTWpSg!Z*m{yzYh#vn%p04S1mZn9s31sDiwvs9N!a-ym+pAzAhVx zGeJ$;=O1iqsiBRh3o`DQ$z*8hvuIB_L4s8m%dyq5U8rbo`wl%(LBTBb;KcRm?}#h2 z`HOWCq-mYly7j)rzR0}D?VUouxM=$Q`)H60(Oz*)wV(oy4`?sNTO{s)q=d&x-u6wb zu5!08U(h}<)gJ6N=IlS5Tam^0wQAS>Wt;$ zgk|km+e(dj2eK4<{P0V|_lAP8vuj&*KXU}iqR=0HKA1XEyW&_^;gM4hZ|a}M>)WQe zzn@u{+d67PR}0NI#L`}mpF(L`PDFNOg7zv-L%ydJcb)?)a(gw}*$2s zS4Lx5a5?ORMus>Yk2!YcW|sJRj^dx{se4me@%UV_i3zS!31T5beLrEja%kx;vn7Sw zxqFyE-LHP_8OH!YPrYB)6>yBR4+{L%P4mN{80KoW+l!0&*n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cDacXnYo8d!qXe>i2DZiZ~A@J#c&22BU`s=e47(sSsUT+>2C zm(Gc9xmVDcJuC#JIVt=cC3#~iDQOTdQl!#jHK}1PN+R4Wi{_Q3Bxg$R7gEYxFc2KI zE;sZ{+YE3>+=N>f9=ySg-4Ow85Hv2BG}g;beK;xCm;swwgm8WeS9AG_;qc*`LtK9k6TU)VD`B6gK+|`C zi3;#>1;CyGw$qpSg$dB;hnFsQoi6i}hFW)W3AZp-D#57Fa#J3Texu@iRZLW* z@`Y+drM0<`ni6GaSr~|D8DMMXg82`VjU<`M^gr9|EW0jXQPx&WTK}A_bl(p8Gg3Cb E0g}vs4gdfE delta 22 ecmdnRwv2g#3KwH>kh>GZx^prwHy>iGU<3eF)d%MQ diff --git a/android/app/src/main/res/drawable-mdpi/icon_qr_gray.png b/android/app/src/main/res/drawable-mdpi/icon_qr_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..cb73ad1e04034497dfa2e873f393259d3a29f52f GIT binary patch literal 1928 zcmY*adpy)xAO2N?H51Ve%@W2`u5)3KF=q6d9SkL5tg*Qb<1#MeHp7f42^+Z;MMcVG z(vAo%xeSZVb)(%xllZjk#_JLhvkci$y}j>yKA&^G-}9X3JkR%g{yFKVPTDDe)xZD% zDA-fTF4A~FI#s`tm9B=dax&5Y3bJ;z27uZe$R>Sf5BI0II08Vt4ge&j0KkS6N}2%x zju8ON`T_vHP^uAG)a*=<9>_;hJYoO<^7YQ#1>7it0l+Q~CY8pfIiA4#M}(v4j0nE~ zG&ej_$_4-e7cWi21K4ypH$03LgXayV+#ulj1d-t#iFDPR1A;B zrgKrOm_wgL{-Z+b#?GWlZ?U{6Flo4*|1d{y)Wh>hvQjZPf})zssmynl#!?Ah650zWM9K z>Fu_alEwCeBjd$GN3(t!HR-U#O+6{Ed}maO%Sh}Nb?CVWMmeZ0RKb9KD?Nff&CsTK z>#riGUu_<+eS8Qi*k_0SE?(3fZVCDK!}>aJL40N{gnZ)gyhAEreplme1r@2O*#BnJ zl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CKDh4vbEEh@@eCuaYTI2r^n+MOA7s{uFroT-dc`%H71rA<%G-%~!e0qGe zu@o%i#Ez3EULcWPqAV7E_l#-z;yWMNAJ(=Nu0rQCXy2}c?fiH4HYdr|B;VwJ0I!Ej A7ytkO literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-xhdpi/icon_qr_gray.png b/android/app/src/main/res/drawable-xhdpi/icon_qr_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..71c6fd567d0039c60d59bb5354273814f1638f5a GIT binary patch literal 3559 zcmY*ccQ_kd`;OhFwwe_pG0IC4s|2x2ZCb6ZR%q--Y&DA-;k7A>7Hz89qCummy{k2g z5~IT^HBy~VF3>SKxKt7x5QZ*87evZc)=W9e4Nm*ATQrj zHUOX!q;wj3p>dAjATLjEKcyfPh9#I1d!W(#RC7<%30oFDGKDRB0B!{r*J)r*^jWd7(uu5#>21 zww^Vct9%8sMwxU|Z$ArNj@0%_0Pd6+d5*+$5mTuIrpDV@idDhSZ6o=dLI)>MZXXK5 z$pxqxVxU5RChyYf+kUl^lY#z-{0MaAts37Y=PuVi^5oA{pb+ztxmsK(uLW5&_L;#H zDZ6|LZ4v7us1_b3|AQE8dVF-ax0Ur-LLjYH4>@3B>&B5 zPa#n^*WC$Y%!i$KLY!R?Goa;=d9M9&sj!E_JADKFsesajdWicKHO97IdxRScCm*Q3 zx9=VF^yKL#cFYUD)0{hB28Kp47WQ=$l-Dw&T$TTvBSBIgS0n&Cjq#}wl5blZ==CGE zj#^DkUv(7|KYH5IKW}MF%gIX`vtAU|1K4vXq3hUa1>1MN-KP4g&wO#K{L964mijEa zh@GUe7)JoFQY>x5t7O}Pv=V_{25$4l;^MUD^cprUdK`=cMsbQNo$QeY2|Kold+Y%sR;AU2n`_Fx@(sn{J(T zPQO3UfY+g#ru|PgEge>F;4$lllI2G&X>;ldCo1V&LWILY=aV}>{aE^iwCgLC7ZGqF z$d{ve8Zw)85zX*ZbN)FqKetB$pu$j(a2Me#6)2hX*=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vD7uveaM*EQooh%w+->T1RnA3h|qqkSZu-~2m`EIwFlB^6s1)6eP zk7Z2B@r}sik5;LxQSV-PlKUd1Pei{#u16qT0){@BR(**&f^7S!BJW1aFFGeBC0;@B zC(9jk+ICwIW^^cp`MvD~EWn!MZe6>7fm}Laj)+Xu>}UV|(52H@>=U)<_9hc099nwF z*Vm=EOEk*m9$j_@De-5??9E2X3WcS^u8wHD&G^l#)wH$v0g=G!#@m-&T`_H)Qs>7r z3Xzk3{?3m?s$L{B0ZR0zrZAVl4<`;rOH@~i$u6X$)Ez%ed&0vl|LoIIqx<-?s6UiF zbhb3INW3L>(*Z{|saKFbORYcBNLHSTb{H!bHqEPm1R-0lPqC#@`np$juWRWgZz!MPk)wcjIw?f83qJ*AUvQjveW*DZBn z=t01Q6Wi>LB~li|DED;dxN7Ec-Q3f-Q{y`MofJq7_vi@AS#C@Dm_QXy(5dbt0n;H2 z-Hj^(SpFKL3Qd`&+Al*UQqsW(UA zm7qY(z}$3xLoKTtpC%}^K1MpUSUTb4YhF`Nh)R6h3Fk?lXUqfT`xQ=Ko4K6}1OLFw z59cx#!$T>zj!T+wB9^R)+|RvxZ*8rjScyxQw*OQJEME2w@B8BK47lVBKY^g9kAYXW zX%<@@(p(a6b%*j?G-7%B;u$mx_SZQtCY$;hxxxa0=Z{rS=H1gAip@wa!gp4$V)?Tm v=Ls_0YB4r%1$LhVd>8qw;KmejdBuYJ9W8ESsqy&lf1v7PEya)W$cTRdmS*DT literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-xxxhdpi/icon_qr_gray.png b/android/app/src/main/res/drawable-xxxhdpi/icon_qr_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..cd5d3df69a678b3152098e801edf266dffc5c586 GIT binary patch literal 917 zcmV;G18V$0-Byx%_dXVhmeU9J*GzVz2O`wvp5WBTOk>Y6d z^g06&2@+vA?}?w8;ZU<#K+dnO-k+7#X;H3jUE7?MtKaTtozq$!8?V#r_I=C-7FZk? z*Vk{0#p;Js@|0^(M0@gm`97ryhQ@JG-h3z))h`9Z{%)>M-?tda$T-{^`RX2iRyS_f zp1lpZBtzq9M!>kny%?D@vY~No*Rm0&S!nw8ShL}Av>QeZ)tpT|mJD1R-Yrqum6Lbz z6qgAeN9$j9J^XOKy!kx8{Pr$)qw+euF0ZrOSFKKC^}^$5o%qm$Kj+KkYiS?X>x?k+ zHhS4W$I(VNp||mAu!wCtB0>gk5{Sme(G`wLOtaAR>k4z@mkw|oUF*xxc?hZg;c*zz z6Ct{;>sLitow#T3orC_^H2=H%oB!Wbh#nkAj)84<>@MJ}-^~}_-=Gt%f}^j2%?Jn? zw`XK%M2t@ia4xnR}qI5qATJkE~}3WS1Trg!!8Rcd1s-ym_C+rgWaG>xGE8GbwW%ZO99Q^ z2+VrHgXv@WUdI%Orube5Jkcy=yHgm^6ou##o7b@yE2fW*XjJ!(<+9MrQn*}wkqlVG z^s!ujgAc)3E_A{tl~}GQr=~Sim$+Y`;2J7DKB0P>FM`@8hgQO|jg$=>~SwbiZ(IJyc2V|3c ruR}XcnwsO;&&t_lAuX}%Z*uYn>zhW`dCCZ400000NkvXXu0mjfBvH5> literal 0 HcmV?d00001 diff --git a/ios/StatusIm/Images.xcassets/icon_qr_gray.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_qr_gray.imageset/Contents.json new file mode 100644 index 0000000000..1738a7c226 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_qr_gray.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_qr_gray.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/icon_qr_gray.imageset/icon_qr_gray.png b/ios/StatusIm/Images.xcassets/icon_qr_gray.imageset/icon_qr_gray.png new file mode 100644 index 0000000000000000000000000000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OH@~i$u6X$)Ez%ed&0vl|LoIIqx<-?s6UiF zbhb3INW3L>(*Z{|saKFbORYcBNLHSTb{H!bHqEPm1R-0lPqC#@`np$juWRWgZz!MPk)wcjIw?f83qJ*AUvQjveW*DZBn z=t01Q6Wi>LB~li|DED;dxN7Ec-Q3f-Q{y`MofJq7_vi@AS#C@Dm_QXy(5dbt0n;H2 z-Hj^(SpFKL3Qd`&+Al*UQqsW(UA zm7qY(z}$3xLoKTtpC%}^K1MpUSUTb4YhF`Nh)R6h3Fk?lXUqfT`xQ=Ko4K6}1OLFw z59cx#!$T>zj!T+wB9^R)+|RvxZ*8rjScyxQw*OQJEME2w@B8BK47lVBKY^g9kAYXW zX%<@@(p(a6b%*j?G-7%B;u$mx_SZQtCY$;hxxxa0=Z{rS=H1gAip@wa!gp4$V)?Tm v=Ls_0YB4r%1$LhVd>8qw;KmejdBuYJ9W8ESsqy&lf1v7PEya)W$cTRdmS*DT literal 0 HcmV?d00001 diff --git a/src/status_im/accounts/login/screen.cljs b/src/status_im/accounts/login/screen.cljs index 532dfdd88d..1e500fb54c 100644 --- a/src/status_im/accounts/login/screen.cljs +++ b/src/status_im/accounts/login/screen.cljs @@ -20,7 +20,6 @@ icon-qr button-input white-form-text-input]] - [status-im.qr-scanner.views.scan-button :refer [scan-button]] [status-im.i18n :refer [label]] [status-im.accounts.login.styles :as st])) diff --git a/src/status_im/components/image_button/styles.cljs b/src/status_im/components/image_button/styles.cljs new file mode 100644 index 0000000000..75782a54aa --- /dev/null +++ b/src/status_im/components/image_button/styles.cljs @@ -0,0 +1,28 @@ +(ns status-im.components.image-button.styles) + +(def image-button + {:position :absolute + :bottom 2 + :right 16 + :flex 1 + :height 50 + :alignItems :center}) + +(def image-button-content + {:flex 1 + :flexDirection :row + :height 50 + :alignItems :center + :alignSelf :center}) + +(def image-button-text + {:flex 1 + :flexDirection :column + :letter-spacing -0.3 + :margin-left 8}) + +(def scan-button-text + (merge image-button-text {:color "#7099e6"})) + +(def show-qr-button-text + (merge image-button-text {:color "#838c93"})) \ No newline at end of file diff --git a/src/status_im/components/image_button/view.cljs b/src/status_im/components/image_button/view.cljs new file mode 100644 index 0000000000..d95f9a3b17 --- /dev/null +++ b/src/status_im/components/image_button/view.cljs @@ -0,0 +1,31 @@ +(ns status-im.components.image-button.view + (:require [re-frame.core :refer [subscribe dispatch dispatch-sync]] + [status-im.components.react :refer [view + text + image + touchable-highlight]] + [status-im.components.styles :refer [icon-scan]] + [status-im.i18n :refer [label]] + [status-im.components.image-button.styles :as st])) + +(defn image-button [{:keys [value style icon handler]}] + [view st/image-button + [touchable-highlight {:on-press handler} + [view st/image-button-content + [image {:source {:uri (or icon :scan_blue)} + :style icon-scan}] + (when text + [text {:style style} value])]]]) + +(defn scan-button [{:keys [show-label? handler]}] + [image-button {:icon :scan_blue + :value (if show-label? + (label :t/scan-qr)) + :style st/scan-button-text + :handler handler}]) + +(defn show-qr-button [{:keys [handler]}] + [image-button {:icon :icon_qr_gray + :value (label :t/show-qr) + :style st/show-qr-button-text + :handler handler}]) \ No newline at end of file diff --git a/src/status_im/components/selectable_field/styles.cljs b/src/status_im/components/selectable_field/styles.cljs index f121e04ca7..88774a9594 100644 --- a/src/status_im/components/selectable_field/styles.cljs +++ b/src/status_im/components/selectable_field/styles.cljs @@ -14,9 +14,9 @@ :font-size 14}) (def text-container - {:padding 0 - :margin-bottom 18 - :margin 0}) + {:padding 0 + :margin-bottom 18 + :margin 0}) (def text {:font-size 16 diff --git a/src/status_im/contacts/views/new_contact.cljs b/src/status_im/contacts/views/new_contact.cljs index 59535c26a0..9891097bdb 100644 --- a/src/status_im/contacts/views/new_contact.cljs +++ b/src/status_im/contacts/views/new_contact.cljs @@ -20,7 +20,7 @@ icon-back button-input-container button-input]] - [status-im.qr-scanner.views.scan-button :refer [scan-button]] + [status-im.components.image-button.view :refer [scan-button]] [status-im.i18n :refer [label]] [cljs.spec :as s] [status-im.contacts.validations :as v] @@ -90,10 +90,10 @@ :on-change-text #(do (dispatch [:set-in [:new-contact-identity] %]) (dispatch [:set :new-contact-address-error nil]))}] - [scan-button {:showLabel (zero? (count whisper-identity)) - :handler #(dispatch [:scan-qr-code - {:toolbar-title (label :t/new-contact)} - :set-contact-identity-from-qr])}]])) + [scan-button {:show-label? (zero? (count whisper-identity)) + :handler #(dispatch [:scan-qr-code + {:toolbar-title (label :t/new-contact)} + :set-contact-identity-from-qr])}]])) (defview new-contact [] diff --git a/src/status_im/group_settings/screen.cljs b/src/status_im/group_settings/screen.cljs index 71c89efaf1..68d82a9f87 100644 --- a/src/status_im/group_settings/screen.cljs +++ b/src/status_im/group_settings/screen.cljs @@ -29,7 +29,7 @@ (defview member-menu [] [{:keys [name] :as participant} [:selected-participant]] (when participant - [modal {:animated false + [modal {:animationType :none :transparent false :onRequestClose close-member-menu} [touchable-highlight {:style st/modal-container diff --git a/src/status_im/profile/screen.cljs b/src/status_im/profile/screen.cljs index fd066e59b9..9d1a454492 100644 --- a/src/status_im/profile/screen.cljs +++ b/src/status_im/profile/screen.cljs @@ -9,9 +9,11 @@ text-input image icon + modal scroll-view touchable-highlight touchable-opacity + touchable-without-feedback show-image-picker dismiss-keyboard!]] [status-im.components.icons.custom-icons :refer [oct-icon]] @@ -27,6 +29,7 @@ [status-im.profile.validations :as v] [status-im.profile.styles :as st] [status-im.utils.random :refer [id]] + [status-im.components.image-button.view :refer [show-qr-button]] [status-im.i18n :refer [label]])) (defn toolbar [{:keys [account edit?]}] @@ -161,8 +164,20 @@ )} [view [text {:style st/report-user-text} (label :t/report-user)]]]]]]) +(defview qr-modal [] + [qr [:get-in [:profile-edit :qr-code]]] + [modal {:transparent true + :visible (not (nil? qr)) + :animationType :fade} + [touchable-without-feedback {:on-press #(dispatch [:set-in [:profile-edit :qr-code] nil])} + [view st/qr-code-container + [view st/qr-code + [qr-code {:value (str "ethereum:" qr) + :size 220}]]]]]) + (defview my-profile [] [edit? [:get-in [:profile-edit :edit?]] + qr [:get-in [:profile-edit :qr-code]] current-account [:get-current-account] changed-account [:get :profile-edit]] (let [{:keys [phone @@ -171,6 +186,7 @@ changed-account current-account)] [scroll-view {:style st/profile + :bounces false :keyboardShouldPersistTaps true} [status-bar] [toolbar {:account account @@ -188,16 +204,20 @@ [view st/underline-container]] [view st/profile-property - [selectable-field {:label (label :t/address) - :value address}] + [view st/profile-property-row + [view st/profile-property-field + [selectable-field {:label (label :t/address) + :value address}]] + [show-qr-button {:handler #(dispatch [:set-in [:profile-edit :qr-code] address])}]] [view st/underline-container]] [view st/profile-property - [selectable-field {:label (label :t/public-key) - :value public-key}]] + [view st/profile-property-row + [view st/profile-property-field + [selectable-field {:label (label :t/public-key) + :value public-key}]] + [show-qr-button {:handler #(dispatch [:set-in [:profile-edit :qr-code] public-key])}]]] [view st/underline-container] - [view st/qr-code-container - [qr-code {:value (str "ethereum:" public-key) - :size 220}]]]])) + [qr-modal]]])) diff --git a/src/status_im/profile/styles.cljs b/src/status_im/profile/styles.cljs index 932ce7f98b..5c51c35879 100644 --- a/src/status_im/profile/styles.cljs +++ b/src/status_im/profile/styles.cljs @@ -121,6 +121,14 @@ (def profile-property {:margin-left 16}) +(def profile-property-row + {:flex 1 + :flex-direction :row}) + +(def profile-property-field + {:margin-right 90 + :flex 1}) + (def profile-input-wrapper {:margin-bottom 16}) @@ -143,9 +151,19 @@ :letter-spacing 0.5}) (def qr-code-container - {:flex 1 - :alignItems :center - :margin 32}) + {:flex 1 + :alignItems :center + :justify-content :center + :background-color "#000000aa"}) + +(def qr-code + {:width 250 + :height 250 + :background-color "white" + :border-radius 4 + :align-items :center + :padding-top 15 + :elevation 4}) (def hashtag {:color "#7099e6"}) diff --git a/src/status_im/qr_scanner/styles.cljs b/src/status_im/qr_scanner/styles.cljs index 607f5b7a33..7e92540003 100644 --- a/src/status_im/qr_scanner/styles.cljs +++ b/src/status_im/qr_scanner/styles.cljs @@ -73,26 +73,4 @@ {:flex 1 :flexDirection :column :color color-white - :margin-left 8}) - - -(def scan-button - {:position :absolute - :bottom 0 - :right 16 - :flex 1 - :height 50 - :alignItems :center}) - -(def scan-button-content - {:flex 1 - :flexDirection :row - :height 50 - :alignItems :center - :alignSelf :center}) - -(def scan-text - {:flex 1 - :flexDirection :column - :color "#7099e6" :margin-left 8}) \ No newline at end of file diff --git a/src/status_im/qr_scanner/views/import_button.cljs b/src/status_im/qr_scanner/views/import_button.cljs deleted file mode 100644 index 3fd20640b7..0000000000 --- a/src/status_im/qr_scanner/views/import_button.cljs +++ /dev/null @@ -1,21 +0,0 @@ -(ns status-im.qr-scanner.views.import-button - (:require-macros [status-im.utils.views :refer [defview]]) - (:require [re-frame.core :refer [subscribe dispatch dispatch-sync]] - [status-im.components.react :refer [view - text - image - touchable-highlight]] - [status-im.components.styles :refer [icon-qr]] - [status-im.i18n :refer [label]] - [status-im.qr-scanner.styles :as st])) - - -(defview import-button [handler] - [] - [view st/import-button - [touchable-highlight - {:on-press handler} - [view st/import-button-content - [image {:source {:uri :icon_qr} - :style icon-qr}] - [text {:style st/import-text} (label :t/import-qr)]]]]) \ 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 deleted file mode 100644 index 07c15be14f..0000000000 --- a/src/status_im/qr_scanner/views/scan_button.cljs +++ /dev/null @@ -1,22 +0,0 @@ -(ns status-im.qr-scanner.views.scan-button - (:require-macros [status-im.utils.views :refer [defview]]) - (:require [re-frame.core :refer [subscribe dispatch dispatch-sync]] - [status-im.components.react :refer [view - text - image - touchable-highlight]] - [status-im.components.styles :refer [icon-scan]] - [status-im.i18n :refer [label]] - [status-im.qr-scanner.styles :as st])) - - -(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 diff --git a/src/status_im/translations/en.cljs b/src/status_im/translations/en.cljs index 59a8ca8979..a98bb58865 100644 --- a/src/status_im/translations/en.cljs +++ b/src/status_im/translations/en.cljs @@ -117,6 +117,7 @@ :contacts-group-people "People" :contacts-group-new-chat "Start new chat" :no-contacts "No contacts yet" + :show-qr "Show QR" ;group-settings :remove "Remove"