From abf0128a1af93f56a5f8ac61736a2b60661e5af6 Mon Sep 17 00:00:00 2001 From: Gustavo Nunes Date: Tue, 28 Mar 2017 15:23:58 -0300 Subject: [PATCH] transaction screens UI refresh --- .../drawable-hdpi/icon_arrow_left_white.png | Bin 0 -> 307 bytes .../res/drawable-hdpi/icon_close_white.png | Bin 253 -> 300 bytes .../main/res/drawable-hdpi/icon_ok_white.png | Bin 0 -> 421 bytes .../drawable-mdpi/icon_arrow_left_white.png | Bin 0 -> 226 bytes .../res/drawable-mdpi/icon_close_white.png | Bin 201 -> 251 bytes .../main/res/drawable-mdpi/icon_ok_white.png | Bin 0 -> 421 bytes .../drawable-xhdpi/icon_arrow_left_white.png | Bin 0 -> 383 bytes .../res/drawable-xhdpi/icon_close_white.png | Bin 329 -> 384 bytes .../main/res/drawable-xhdpi/icon_ok_white.png | Bin 0 -> 934 bytes .../drawable-xxhdpi/icon_arrow_left_white.png | Bin 0 -> 549 bytes .../res/drawable-xxhdpi/icon_close_white.png | Bin 401 -> 603 bytes .../res/drawable-xxhdpi/icon_ok_white.png | Bin 0 -> 1585 bytes .../icon_arrow_left_white.png | Bin 0 -> 767 bytes .../res/drawable-xxxhdpi/icon_close_white.png | Bin 546 -> 886 bytes .../res/drawable-xxxhdpi/icon_ok_white.png | Bin 0 -> 1585 bytes .../Contents.json | 21 +++ .../icon_arrow_left_white.png | Bin 0 -> 767 bytes .../icon_close_white.png | Bin 401 -> 384 bytes .../icon_ok_white.imageset/Contents.json | 23 ++++ .../icon_ok_white.imageset/iconOkBig.png | Bin 0 -> 421 bytes .../icon_ok_white.imageset/iconOkBig@2x.png | Bin 0 -> 934 bytes .../icon_ok_white.imageset/iconOkBig@3x.png | Bin 0 -> 1585 bytes src/status_im/android/core.cljs | 8 +- src/status_im/chat/handlers/send_message.cljs | 2 +- src/status_im/components/common/common.cljs | 4 +- src/status_im/components/styles.cljs | 7 + .../components/text_field/styles.cljs | 3 +- src/status_im/components/text_field/view.cljs | 93 ++++++------- .../components/toolbar_new/actions.cljs | 4 + .../components/toolbar_new/view.cljs | 4 +- src/status_im/ios/core.cljs | 8 +- src/status_im/transactions/handlers.cljs | 38 ++++-- src/status_im/transactions/screen.cljs | 62 --------- .../screens/confirmation-success.cljs | 25 ++++ .../screens/pending-transactions.cljs | 69 ++++++++++ .../screens/transaction-details.cljs | 70 ++++++++++ src/status_im/transactions/styles.cljs | 105 -------------- .../transactions/styles/list_item.cljs | 52 +++++++ .../transactions/styles/password_form.cljs | 30 ++++ .../transactions/styles/screens.cljs | 129 ++++++++++++++++++ .../transactions/views/list_item.cljs | 39 ++++++ .../transactions/views/password_form.cljs | 29 ++++ .../transactions/views/transaction_page.cljs | 50 ------- src/status_im/translations/en.cljs | 12 ++ 44 files changed, 604 insertions(+), 283 deletions(-) create mode 100644 android/app/src/main/res/drawable-hdpi/icon_arrow_left_white.png create mode 100644 android/app/src/main/res/drawable-hdpi/icon_ok_white.png create mode 100644 android/app/src/main/res/drawable-mdpi/icon_arrow_left_white.png create mode 100644 android/app/src/main/res/drawable-mdpi/icon_ok_white.png create mode 100644 android/app/src/main/res/drawable-xhdpi/icon_arrow_left_white.png create mode 100644 android/app/src/main/res/drawable-xhdpi/icon_ok_white.png create mode 100644 android/app/src/main/res/drawable-xxhdpi/icon_arrow_left_white.png create mode 100644 android/app/src/main/res/drawable-xxhdpi/icon_ok_white.png create mode 100644 android/app/src/main/res/drawable-xxxhdpi/icon_arrow_left_white.png create mode 100644 android/app/src/main/res/drawable-xxxhdpi/icon_ok_white.png create mode 100644 ios/StatusIm/Images.xcassets/icon_arrow_left_white.imageset/Contents.json create mode 100644 ios/StatusIm/Images.xcassets/icon_arrow_left_white.imageset/icon_arrow_left_white.png create mode 100644 ios/StatusIm/Images.xcassets/icon_ok_white.imageset/Contents.json create mode 100644 ios/StatusIm/Images.xcassets/icon_ok_white.imageset/iconOkBig.png create mode 100644 ios/StatusIm/Images.xcassets/icon_ok_white.imageset/iconOkBig@2x.png create mode 100644 ios/StatusIm/Images.xcassets/icon_ok_white.imageset/iconOkBig@3x.png delete mode 100644 src/status_im/transactions/screen.cljs create mode 100644 src/status_im/transactions/screens/confirmation-success.cljs create mode 100644 src/status_im/transactions/screens/pending-transactions.cljs create mode 100644 src/status_im/transactions/screens/transaction-details.cljs delete mode 100644 src/status_im/transactions/styles.cljs create mode 100644 src/status_im/transactions/styles/list_item.cljs create mode 100644 src/status_im/transactions/styles/password_form.cljs create mode 100644 src/status_im/transactions/styles/screens.cljs create mode 100644 src/status_im/transactions/views/list_item.cljs create mode 100644 src/status_im/transactions/views/password_form.cljs delete mode 100644 src/status_im/transactions/views/transaction_page.cljs diff --git a/android/app/src/main/res/drawable-hdpi/icon_arrow_left_white.png b/android/app/src/main/res/drawable-hdpi/icon_arrow_left_white.png new file mode 100644 index 0000000000000000000000000000000000000000..d9a494ffb9dca08daccd394c7ae6097df4bb39c0 GIT binary patch literal 307 zcmV-30nGl1P)Px#?MXyIR9Fe^l`#(iF&Kug5(}fzCg)$^@YDPdW{Xv9ViJSFZenL(uBVA6H(Yw( zpepix$(w7hZ`=2trnxNBQUXdq2`GU-CSa`{paWW=X3|e3K!F~}*ECrm5)`N$=0d-f zBv3_|EARRm=38Wp1T|rX_|~Xh@^5ILOZ`yOGI%t`%tI#e7=cdc6E&&Zv{7exkKcs8 zkj+uLhYW5^dSp4?E$Sj)OBy@h5j@?I?FBxWh4adhyW+l{G{&;okz54OP$IS!q}*?$ zBbpq`R1s|k1|%Oc%$NbB7>k44ofy`glX(f`Jo9vM42j@; z8`j8q*nsEtx8(mXm91Bar(TL!&=avO^Z20+2LrNh22Gig7O8crv1oye2Ky(zE!V=H z^xc`T{RK-gTemjhVt%DJ1v?M zG_;yaJ4F?oL=I~7mG}y-ikhWyS)rq!U1G!a#xnl;w%bRf7HKRx{-I_j^LmYj$}g&c z7c>pOYajVr(^k;VXXv+cN|eG0w`fe8_03Jc3U=`ibM|?m!bcBYkqJ2j^f7~{tDnm{r-UW|z&d*D literal 253 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|#^NA%Cx&(BWL^R}+dW+zLo5W> zhA{FqC~%b2-Y9>fUlsFygSGfMO{Uz9fqMPIeo9xPjQ_OF|Dep;8&T0{Y_`0-F?=(( z|MVUSi;YR{EJIPQ$ME6bBvdJZvNYuTos>U=E0 zFm%8E%!wJ^Nz0eZ3IFK`-dZ+c)0s8D1f_+h35(xWNNkImwmMF5L3bhJ-h$=39lzZ6 zKV7M`?V4?hig!c$*;^754<0*nsP^lmuLr*|eDpp3@9~0VfSd4!HbK=MJQlptJehDYE z)YR{ri|x)?e%O)O!~ubRv8`GaweZ{u+f~cw&oE$g$PTeE)7v-u15Z}qf~e%r_FEZF z_sYiH*!JsJ%g+4Dbs9JIAG8HB>6k0dSz7C9X05(4edn~fo44qnOna{KP3QWi;%VPh zZ@!sxWZu)LGQTW&Hun{|vB@v%a<8kumTBVCu-Dr$V~g#R?fadNZEnB%<9sp4@9!mF z*Ko}gIakWi_?d0N?-fj)wUi77bEMEa#}Dm=#D(xOwns z%Na2}wv=xLLMM_Q>}%BFdnbG%>0y+EUw3;ob0up+@s8~_AM@w@bu>wr`Eya$pCdwV zj`(+`O*K0hiWo0MU)XiOky|01!Ddm}ipKx*jCn6GfKW=_1HO6frdOs!2rdSOJA literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-mdpi/icon_arrow_left_white.png b/android/app/src/main/res/drawable-mdpi/icon_arrow_left_white.png new file mode 100644 index 0000000000000000000000000000000000000000..5344b610f38563632515cd789e7ea370fe484333 GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|=6Jd|hIsHM zCrGd^R&>}d@Zkh4pZq&4&fA-x&s*dTVLJzkMyVrxs$FH!LOk@yfRuW}- z$FPxSnHHC8L))dhLIH6P7F@VHPx#wMj%lR7ef&Q^5^`Fc2fCE5JTX!E!9nC145O3;;uBC4LbGP{&k$mP!^e-NkwruXhaoA>@{_nSQkdMF z3kpNthIP1AuAkJwY@hcj^IAGS2}Y-9EZ0RO%o)`_uK)i-$|%KUrwbFlVwOB5@HTMN zm=Eohn79P4cg}6G4%iCg4)`1W)yA^2E(u(azz07;HLq{{LEQiV002ovPDHLkV1mSd BW_Sd4!HbK=MJQlptJehDYE z)YR{ri|x)?e%O)O!~ubRv8`GaweZ{u+f~cw&oE$g$PTeE)7v-u15Z}qf~e%r_FEZF z_sYiH*!JsJ%g+4Dbs9JIAG8HB>6k0dSz7C9X05(4edn~fo44qnOna{KP3QWi;%VPh zZ@!sxWZu)LGQTW&Hun{|vB@v%a<8kumTBVCu-Dr$V~g#R?fadNZEnB%<9sp4@9!mF z*Ko}gIakWi_?d0N?-fj)wUi77bEMEa#}Dm=#D(xOwns z%Na2}wv=xLLMM_Q>}%BFdnbG%>0y+EUw3;ob0up+@s8~_AM@w@bu>wr`Eya$pCdwV zj`(+`O*K0hiWo0MU)XiOky|01!Ddm}ipKx*jCn6GfKW=_1HO6frdOs!2rdSOJA literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-xhdpi/icon_arrow_left_white.png b/android/app/src/main/res/drawable-xhdpi/icon_arrow_left_white.png new file mode 100644 index 0000000000000000000000000000000000000000..182a421947d2d988f50463e8fe94771cb33c8f93 GIT binary patch literal 383 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC#^NA%Cx&(BWL^T|LRJ&s9Fj??Vno@^j(s?Wbs z<0xa@jCzIpntvFB&hTg6Q)8U;pE>q;3csUVt@P6GtzUVpG=8q}zF#;e`&!ats~P2r z(S?VO@g^5XN_}kV*8To)-)9}W6yH!k6F2|G*Oq))b~)s-CSP`JPxXp*U%Kueh&=gH zr&i?sg0+5=19jI`F?6n9Bc;8V_j5*5v78eBhmGZ*)RH`kyq4T?xxY+x@_UCx@_%?O z9vx(<(qfHGjeV0^Aza?0WV0eR=Q!uPgk7w@3)2oIFGKd8#{=&N%$yTFJ&KGaK|#&n M>FVdQ&MBb@07;>iKmY&$ literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-xhdpi/icon_close_white.png b/android/app/src/main/res/drawable-xhdpi/icon_close_white.png index 5c8005f904a4aaadbf49206285f7f7aedeae3984..dcdf4125035082654f49b45791fc1d206d804a54 100644 GIT binary patch literal 384 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC#^NA%Cx&(BWL^T=#-##<_C7(^TJl>@9-moiTVeX!fPbJUhZJaSJSvuH6T(;e7 z{n}fQ}iM&ides#nvN11#2{zggO%| zovipLxJx&6vKc1ys72YUu49Xc_ST#?bqUk0lH}Bnft6go4?dRfSQou2V;jc`_wqfZ z1)P6$cQ>y49C~NF?1sXVdP`=o?O41x`GDE?$Ny(B#B$!7Cw@I>PPXqM2BTSFeF1ye z&n)IWSkbKHFi}EZd}%&oX6Moe=UfmdKI;Vst0BPfz-v9sr literal 329 zcmV-P0k-~$P)Px$14%?dR7efQRzVJfFbqR`TwlNu9?!&{F?BX5Q(HA5DVi3^bUpcSX)P6M`7y7ETI1o=I2YMdiC z5|*oR8Qgl*Mxts0&I0(mkC=qTWfUHhVe!I5Yn|8Cd%}0EMkl?QtN)W}rc{f|-=Nu; zxHwY)Xsf1!OZ*{1e_4&{*#X1VMYnj6d!wOXJFd8iA%6ccwZx@WPmbhPYlIldJxsy` zu-qJXV%6_?a>+%4w&A$nP{U+qo7|wwh(C7vxQ;Ee-Spj+w-ZB^D^R{C$EN>_&lY}2 bu<-N&>}@IStlO{$00000NkvXXu0mjf6AO+w diff --git a/android/app/src/main/res/drawable-xhdpi/icon_ok_white.png b/android/app/src/main/res/drawable-xhdpi/icon_ok_white.png new file mode 100644 index 0000000000000000000000000000000000000000..9ee251d97693f1f96ede5f1d2b9d48e98d72cb1b GIT binary patch literal 934 zcmeAS@N?(olHy`uVBq!ia0vp^1t8491|*L?_~H$u7>k44ofy`glX=O&z?|Ue;uuoF z_;#*s-xUV|w{k}%^#^RH1vxBP885PFD;e!z>Iha~ViFKCRBYmQ*d}zH!Aaoo^`7V? zo&Q_kYL#z~_coRLUlMw~`qLRUW9#&E9u5ZvCV>V976k@IqM2n54+<=7f@(tlgwzDa zyj$@0Q}mP-v%9u;t^2s=51;lshht59%446+O5VS9Z?s`kQS{^)hLsmzhrapbR&%H< zn#plq*ax?d1-GXL*v@n~G*|rHfe%7e6JuI9%~*tk z|2k z69;7NllmJx`$+5wZl=QloBh?ec&4ZRFIr`K?I-)`!0_*jXVpo)@sYXdb>-K0b$zYS z&#vBgw(hy4s-!PC)AdRn{(@;Qr^#l2D$tPJiwv*TQp(x)^J&$&rJ z{z^5mnEl&ap6E_6EPoXxG|~L}0j|%}yj<>a2~ArzLtC)Y`{a6y`nDt1vy8t8=UCMm zefqcKcbAU2x9S~D`SU*t7o}IQSH^`2tMX-A&vTtOeNRNXYv+mXfW6zbJzVB(-%_@h zRcPY%ww+i1@pPWJ?G+Y(m!>*gI_3q5Pr{8;)z`o!(1OA)m*cL%k||H$p1Zgt>% zUmxR{hkIP^2JZ=v(YDi&d$K|A8lfcq&HI6Vab%OX09(>CV8&zcboFyt=akR{0A*x` AVgLXD literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-xxhdpi/icon_arrow_left_white.png b/android/app/src/main/res/drawable-xxhdpi/icon_arrow_left_white.png new file mode 100644 index 0000000000000000000000000000000000000000..ac7ad9ee16dbabec3269814fc01f3151079f7e56 GIT binary patch literal 549 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY1|&n@ZgvM!jKx9jP7LeL$-D%z?|Zs9hEy=V zy}8kg*-_xw$2m(|7p%xn%uH9_mX!EjJ0db_wv&L+L9d{n4Aa6YnY0C21aoxWxHwKw zn0H@{-O;Rk^64iXv;Q9w$jdL!dp=$Dw(2^6WJ^D>% zO0IUG#Of~VqXoaO9bKmDd}witz+ue=dg&{_v@R1DF8Fe0UsCds&EoD~mfw%vSllJM zW&S>wB~HqI=0>J}^_0(5{t}wVb+B`RNbCa7OgH%OikzL1SP*+*Rc3x zsy&nQJL#hnmH5Ta={~7Bx9QDk%lA)SwrpPWqk3CV_~YCK>hpZ!CKj{luDWjF`jeU8 z#_Nks_uERH6Nbmvx$F5aDDP*rd{*)K#8b|aXB!ok%P>FP`QgOVzq;2hF5=S``?lz} zylC>Pd;cyTad(ZrpR&DlvQOzeJ9F!&^XLBD`)<8|so>^$GAf6yS%f^;7!M1SL8!-m zQN~NW$~zb}Wy+p^&!7L{n)HOe%XgKIozj}Ht~c|NTv*c;zulh_L` literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-xxhdpi/icon_close_white.png b/android/app/src/main/res/drawable-xxhdpi/icon_close_white.png index 32e84becb684c21a652a8362e1f01918fa280ca9..6f6b57979f1ec012e75a520743c8a533060b4e2c 100644 GIT binary patch literal 603 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY1|&n@ZgvM!jKx9jP7LeL$-HD>U=sCoaSW+o zd^^iA@34Y^>*G~H>#yk)&$_cF)bGLXlIv4HFYhwH@qjUnVQ0Nci0I)n|M{H)AD?b@ zWKwa!iDEf)P8YdWFF2b~zNI{0G3arqcb3;%|M#<8f4WLUNyNYSq2aY+hRV*1OWY*F zkAB(aydWSfUq41+VE|8GM#YxW^()u{Hyuq*ILleO;>48~N;#b%D&w#1qQPm76NE{FUeJeB8$~{{X{&3!jfH3Uyy= z7&6$FM9jEX7x?7Gqs(ugnx5{ru2W*zf3be{vX|zcYUL`4jCXS`aCRLnyHuec&{@GD_fT|?;lq~Ir|)|Px$OG!jQR9Fesm|+gWAPj|x35lM2{`5*7XUT3c-&08#0)w_B*rZOBzW0e8$#DC= zd*mItA~)m%d3A$>9$znd(tAOAhZn-6@x%wWQB2fE(j$$9K%~pX5GWXxV92l%h)Y%q zQz)3!V92l$h&@va6DSy*!I0rWAU0R-|Kx-aDkzAwz|iA!Gj$YnH@a9`Tv)jk)tYL7 z2+mB)LdZfR`fZMl-r9seJ*BBVK%@hSu%ssSt&V#PdgfM5&%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b;OSX&jmc*JpS(EmO)l|v&x@dcCu5yu>$>mpGQx}+v#Ea(Mw$`1ue%;G1=~-8A z%vP~kx-U;#PwSkPoyI+ld1uo$->*t-red-ASm+10!u)!fnZh$%fOPmdKI;Vst E05?LJ4FCWD literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-xxxhdpi/icon_arrow_left_white.png b/android/app/src/main/res/drawable-xxxhdpi/icon_arrow_left_white.png new file mode 100644 index 0000000000000000000000000000000000000000..3fccc8e8f039afc0f222f05653b04e41225b18ca GIT binary patch literal 767 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGojKx9jP7LeL$-HD>VA|>F;uuoF z`1aOWFBwOXwuf@OjGId)H-rn6WI6~i{oFZ$h4z0x|N zHQ~{Fw@n@nvim1Va#$trvM%+z?z5M*J@fXf;L!6MrP8aqn%WqcI20O)CwRHG+ zbTZrW3C}M$)i1pfTyndQFYWV{g1D^rq?*sj+k;?o(OfMwGGS%svl&U&s`onileV-OWAQ z*o^NpMjhEA_R-TYYp+D}AMsO`i|>B8s_@w!Y5!%wR@oh~|a7rKE`pYFOcp*pgzdeeAALTAR~lELPSJH^=2~=ePQ3a7@DYX+foeaB^W2-~BZ+f^EWMG!HRP pPJKJ6z{i<^kww6P6hfmb+akNk_(9>0SHKj_;OXk;vd$@?2>=OSKG^^O literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-xxxhdpi/icon_close_white.png b/android/app/src/main/res/drawable-xxxhdpi/icon_close_white.png index 68dbc7fb364667409f872de8f9ca3b08c2fa1715..6493a26160726308e1c77516cb6bba822b848709 100644 GIT binary patch literal 886 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGojKx9jP7LeL$-HD>U^eh{aSW+o zd^_iKuC$>*+ggzc&DEW;P5qh&N|&(7$G9sT*dD`cF0f?66OkjLC;s0!eOk%8NW-oy z{5}KA+Na5B`{wVSqS_H2F2SO}z{ugiz$DPXKm>DxIa7Na=Ul(#)j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d zdNP-(Y}mWE*7sw~N6(MWAEOHW3v*8G+EHG_)Z5T?yvx38+uOxr`l`oWeg_LosOX(D zJ2y;kP3^^xCpEL4%=6^**s-qY-L79Mnp(HyW;^g(N_+0_k5&Kf?Xh6_oZbaz%hKd- zUi``YP0?UV1538u#Qh;_c+VdFDqx^`;l#=ppBg=uZ_WGvSMa>>l@gcA$)4uj>d(9P zu)Ms}>!7?m>BQvCm2*B__sJ9XnsdYBobJ<|lO&YaRtp$R`Mk@$_KA-VgQYOPebws| zlC@5qubs~wIoyBGs>p4Az@uLij6Z%@yuEMEMfE8=?4J18{CTlfIsFT#>NOt>>{}$hlGBHqIU}u)TJ1o^q2|0x~beSr&{Ai zryGOiZFQsU_4mRqIl(Nz&V{hDUt57$-P`E##opa1KuUwP~S-;;ay%*i?;X8F6% z`@=cSZB`t&=6qW4zIIcbdfExglpjn#wixEOzI{01cj~S%pNYjU4zPaw%T@Gl-l@r7 z1U{Uoe{*cI}UQ&S!plU$XaPZRU50vlnfu4*r-9QkXe^Nm8n+y8pS< zN!*`gStsc+Z%MfuaIWUR)0UQ(mr_+?yOw?BeUfwZ(e92VcYi3QoBQddE51A!G4XSP z-QqpnOWw|yxOwhrmDL`*f+{7qEE^02hff&-mEBN#U8FKd|yG&Jc9N5~5gpz9aR z6c6v(yyQgW96?6zGN8T8=XTwg)B{rD%Mr6<;*t}R6~~TFHwy@QqI0i-N$Q2BW|5e| z?JTb;OSX&jmc*JpS(EmO)l|v&x@dcCu5yu>$>mpGQx}+v#Ea(Mw$`1ue%;G1=~-8A z%vP~kx-U;#PwSkPoyI+ld1uo$->*t-red-ASm+10!u)!fnZh$%fOPmdKI;Vst E05?LJ4FCWD literal 0 HcmV?d00001 diff --git a/ios/StatusIm/Images.xcassets/icon_arrow_left_white.imageset/Contents.json b/ios/StatusIm/Images.xcassets/icon_arrow_left_white.imageset/Contents.json new file mode 100644 index 0000000000..1c822daff6 --- /dev/null +++ b/ios/StatusIm/Images.xcassets/icon_arrow_left_white.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_arrow_left_white.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/StatusIm/Images.xcassets/icon_arrow_left_white.imageset/icon_arrow_left_white.png b/ios/StatusIm/Images.xcassets/icon_arrow_left_white.imageset/icon_arrow_left_white.png new file mode 100644 index 0000000000000000000000000000000000000000..3fccc8e8f039afc0f222f05653b04e41225b18ca GIT binary patch literal 767 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGojKx9jP7LeL$-HD>VA|>F;uuoF z`1aOWFBwOXwuf@OjGId)H-rn6WI6~i{oFZ$h4z0x|N zHQ~{Fw@n@nvim1Va#$trvM%+z?z5M*J@fXf;L!6MrP8aqn%WqcI20O)CwRHG+ zbTZrW3C}M$)i1pfTyndQFYWV{g1D^rq?*sj+k;?o(OfMwGGS%svl&U&s`onileV-OWAQ z*o^NpMjhEA_R-TYYp+D}AMsO`i|>B8s_@w!Y5!%wR@oh~|a7rKE`pYFOcp*pgzdeeAALTAR~lELPSJH^=2~=ePQ3a7@DYX+foeaB^W2-~BZ+f^EWMG!HRP pPJKJ6z{i<^kww6P6hfmb+akNk_(9>0SHKj_;OXk;vd$@?2>=OSKG^^O literal 0 HcmV?d00001 diff --git a/ios/StatusIm/Images.xcassets/icon_close_white.imageset/icon_close_white.png b/ios/StatusIm/Images.xcassets/icon_close_white.imageset/icon_close_white.png index 32e84becb684c21a652a8362e1f01918fa280ca9..dcdf4125035082654f49b45791fc1d206d804a54 100644 GIT binary patch literal 384 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC#^NA%Cx&(BWL^T=#-##<_C7(^TJl>@9-moiTVeX!fPbJUhZJaSJSvuH6T(;e7 z{n}fQ}iM&ides#nvN11#2{zggO%| zovipL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ok_white.imageset/iconOkBig@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9ee251d97693f1f96ede5f1d2b9d48e98d72cb1b GIT binary patch literal 934 zcmeAS@N?(olHy`uVBq!ia0vp^1t8491|*L?_~H$u7>k44ofy`glX=O&z?|Ue;uuoF z_;#*s-xUV|w{k}%^#^RH1vxBP885PFD;e!z>Iha~ViFKCRBYmQ*d}zH!Aaoo^`7V? zo&Q_kYL#z~_coRLUlMw~`qLRUW9#&E9u5ZvCV>V976k@IqM2n54+<=7f@(tlgwzDa zyj$@0Q}mP-v%9u;t^2s=51;lshht59%446+O5VS9Z?s`kQS{^)hLsmzhrapbR&%H< zn#plq*ax?d1-GXL*v@n~G*|rHfe%7e6JuI9%~*tk z|2k z69;7NllmJx`$+5wZl=QloBh?ec&4ZRFIr`K?I-)`!0_*jXVpo)@sYXdb>-K0b$zYS z&#vBgw(hy4s-!PC)AdRn{(@;Qr^#l2D$tPJiwv*TQp(x)^J&$&rJ z{z^5mnEl&ap6E_6EPoXxG|~L}0j|%}yj<>a2~ArzLtC)Y`{a6y`nDt1vy8t8=UCMm zefqcKcbAU2x9S~D`SU*t7o}IQSH^`2tMX-A&vTtOeNRNXYv+mXfW6zbJzVB(-%_@h zRcPY%ww+i1@pPWJ?G+Y(m!>*gI_3q5Pr{8;)z`o!(1OA)m*cL%k||H$p1Zgt>% zUmxR{hkIP^2JZ=v(YDi&d$K|A8lfcq&HI6Vab%OX09(>CV8&zcboFyt=akR{0A*x` AVgLXD literal 0 HcmV?d00001 diff --git a/ios/StatusIm/Images.xcassets/icon_ok_white.imageset/iconOkBig@3x.png b/ios/StatusIm/Images.xcassets/icon_ok_white.imageset/iconOkBig@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..54080186bc998b644f1525f580fda7e031278fd2 GIT binary patch literal 1585 zcmeAS@N?(olHy`uVBq!ia0vp^D?pfo4M>)FFWmy97>k44ofy`glX=O&!1~(L#WAFU z@$FpuY>`BPc3W*-7i;T{n?yvkrT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125f6bcd..b5f6bdf709 100644 --- a/src/status_im/android/core.cljs +++ b/src/status_im/android/core.cljs @@ -22,7 +22,9 @@ [status-im.accounts.login.screen :refer [login]] [status-im.accounts.recover.screen :refer [recover]] [status-im.accounts.screen :refer [accounts]] - [status-im.transactions.screen :refer [confirm]] + [status-im.transactions.screens.confirmation-success :refer [confirmation-success]] + [status-im.transactions.screens.pending-transactions :refer [pending-transactions]] + [status-im.transactions.screens.transaction-details :refer [transaction-details]] [status-im.chats-list.screen :refer [chats-list]] [status-im.new-chat.screen :refer [new-chat]] [status-im.new-group.screen-public :refer [new-public-group]] @@ -149,7 +151,9 @@ (let [component (case @modal-view :qr-scanner qr-scanner :qr-code-view qr-code-view - :confirm confirm + :pending-transactions pending-transactions + :transaction-details transaction-details + :confirmation-success confirmation-success :contact-list-modal contact-list-modal)] [component])]])]]))))}))) diff --git a/src/status_im/chat/handlers/send_message.cljs b/src/status_im/chat/handlers/send_message.cljs index 7599620e66..0cb5d94d53 100644 --- a/src/status_im/chat/handlers/send_message.cljs +++ b/src/status_im/chat/handlers/send_message.cljs @@ -73,7 +73,7 @@ (if (:sent-to-jail? message) ;; todo there could be other reasons for "long-running" ;; hanling of the command besides sendTransaction - (dispatch [:navigate-to-modal :confirm]) + (dispatch [:navigate-to-modal :pending-transactions]) (cond (console-command? chat-id command-name) (dispatch [:invoke-console-command-handler! params']) diff --git a/src/status_im/components/common/common.cljs b/src/status_im/components/common/common.cljs index 6b1ba9e108..26c914e44b 100644 --- a/src/status_im/components/common/common.cljs +++ b/src/status_im/components/common/common.cljs @@ -16,8 +16,8 @@ {:style st/gradient-top :colors st/gradient-top-colors}])) -(defn separator [style] - [view st/separator-wrapper +(defn separator [style wrapper-style] + [view (merge st/separator-wrapper wrapper-style) [view (merge st/separator style)]]) (defn form-spacer [] diff --git a/src/status_im/components/styles.cljs b/src/status_im/components/styles.cljs index 972d71c7ef..15e7ac1697 100644 --- a/src/status_im/components/styles.cljs +++ b/src/status_im/components/styles.cljs @@ -13,12 +13,19 @@ (def color-gray6 "#212121") (def color-steel "#838b91") (def color-white "white") +(def color-white-transparent "#ffffff66") +(def color-white-transparent-2 "#fefefe21") (def color-light-blue "#628fe3") (def color-light-blue-transparent "#628fe333") (def color-light-blue2 "#eff3fc") +(def color-light-blue3 "#a0bcf0") +(def color-dark-blue-1 "#252c4a") +(def color-dark-blue-2 "#1f253f") +(def color-dark-blue-3 "#191f37") (def color-light-gray "#EEF2F5") (def color-red "red") (def color-light-red "#e86363") +(def color-light-red2 "#f47979") (def color-separator "#D6D6D6") diff --git a/src/status_im/components/text_field/styles.cljs b/src/status_im/components/text_field/styles.cljs index abe1148428..49b5ff4b53 100644 --- a/src/status_im/components/text_field/styles.cljs +++ b/src/status_im/components/text_field/styles.cljs @@ -41,4 +41,5 @@ (merge input-error-text-style {:color color :background-color :transparent - :font-size 12}))) + :font-size 12 + :line-height 20}))) diff --git a/src/status_im/components/text_field/view.cljs b/src/status_im/components/text_field/view.cljs index b7f7b45c95..cd2d9af8b9 100644 --- a/src/status_im/components/text_field/view.cljs +++ b/src/status_im/components/text_field/view.cljs @@ -115,8 +115,8 @@ max-length]} (r/state component) {:keys [wrapper-style input-style label-hidden? line-color focus-line-color focus-line-height secure-text-entry label-color error-color error label value on-focus on-blur validator - auto-focus on-change-text on-change on-end-editing editable placeholder auto-capitalize - multiline number-of-lines]} + auto-focus on-change-text on-change on-end-editing editable placeholder + placeholder-text-color auto-capitalize multiline number-of-lines]} (merge default-props (r/props component)) line-color (if error error-color line-color) focus-line-color (if error error-color focus-line-color) @@ -126,50 +126,51 @@ [view (merge st/text-field-container wrapper-style) (when-not label-hidden? [animated-text {:style (st/label label-top label-font-size label-color)} label]) - [text-input {:ref #(reset! input-ref %) - :style (merge st/text-input input-style) - :placeholder (or placeholder "") - :editable editable - :multiline multiline - :number-of-lines number-of-lines - :secure-text-entry secure-text-entry - :auto-capitalize auto-capitalize - :on-focus #(on-input-focus {:component component - :animation {:top label-top - :to-top (:label-top config) - :font-size label-font-size - :to-font-size (:label-font-small config) - :line-width line-width - :line-height line-height - :to-line-height focus-line-height} - :onFocus on-focus}) - :on-blur #(on-input-blur {:component component - :value (or current-value value) - :animation {:top label-top - :to-top (:label-bottom config) - :font-size label-font-size - :to-font-size (:label-font-large config) - :line-width line-width - :line-height line-height - :to-line-width 0 - :to-line-height 1} - :onBlur on-blur}) - :on-change-text (fn [text] - (r/set-state component {:current-value text}) - (if (or (not validator) (validator text)) - (do - (r/set-state component {:valid-value text - :temp-value nil}) - (on-change-text text)) - (r/set-state component {:temp-value valid-value - :max-length (count valid-value)}))) - :on-change #(on-change %) - :default-value value - :value temp-value - :max-length max-length - :on-submit-editing #(.blur @input-ref) - :on-end-editing (when on-end-editing on-end-editing) - :auto-focus (true? auto-focus)}] + [text-input {:ref #(reset! input-ref %) + :style (merge st/text-input input-style) + :placeholder (or placeholder "") + :placeholder-text-color placeholder-text-color + :editable editable + :multiline multiline + :number-of-lines number-of-lines + :secure-text-entry secure-text-entry + :auto-capitalize auto-capitalize + :on-focus #(on-input-focus {:component component + :animation {:top label-top + :to-top (:label-top config) + :font-size label-font-size + :to-font-size (:label-font-small config) + :line-width line-width + :line-height line-height + :to-line-height focus-line-height} + :onFocus on-focus}) + :on-blur #(on-input-blur {:component component + :value (or current-value value) + :animation {:top label-top + :to-top (:label-bottom config) + :font-size label-font-size + :to-font-size (:label-font-large config) + :line-width line-width + :line-height line-height + :to-line-width 0 + :to-line-height 1} + :onBlur on-blur}) + :on-change-text (fn [text] + (r/set-state component {:current-value text}) + (if (or (not validator) (validator text)) + (do + (r/set-state component {:valid-value text + :temp-value nil}) + (on-change-text text)) + (r/set-state component {:temp-value valid-value + :max-length (count valid-value)}))) + :on-change #(on-change %) + :default-value value + :value temp-value + :max-length max-length + :on-submit-editing #(.blur @input-ref) + :on-end-editing (when on-end-editing on-end-editing) + :auto-focus (true? auto-focus)}] [view {:style (st/underline-container line-color) :onLayout #(r/set-state component {:max-line-width (get-width %)})} [animated-view {:style (st/underline focus-line-color line-width line-height)}]] diff --git a/src/status_im/components/toolbar_new/actions.cljs b/src/status_im/components/toolbar_new/actions.cljs index 7153620901..5dd0cc6467 100644 --- a/src/status_im/components/toolbar_new/actions.cljs +++ b/src/status_im/components/toolbar_new/actions.cljs @@ -45,3 +45,7 @@ :style st/action-default} :handler handler}) +(defn close-white [handler] + {:image {:source {:uri :icon_close_white} + :style st/action-default} + :handler handler}) diff --git a/src/status_im/components/toolbar_new/view.cljs b/src/status_im/components/toolbar_new/view.cljs index 400af551aa..a7b78f4488 100644 --- a/src/status_im/components/toolbar_new/view.cljs +++ b/src/status_im/components/toolbar_new/view.cljs @@ -25,6 +25,7 @@ background-color :background-color custom-content :custom-content hide-border? :hide-border? + border-style :border-style style :style}] (let [style (merge (st/toolbar-wrapper background-color) style)] [view {:style style} @@ -66,7 +67,7 @@ custom-action)]] [sync-state-gradient-view] (when-not hide-border? - [view st/toolbar-border-container + [view (merge st/toolbar-border-container border-style) [view st/toolbar-border]])])) (def search-text-input (r/atom nil)) @@ -122,4 +123,3 @@ nav-action) :custom-content [toolbar-with-search-content opts] :actions actions}])) - diff --git a/src/status_im/ios/core.cljs b/src/status_im/ios/core.cljs index 9e7652a71b..86c7491092 100644 --- a/src/status_im/ios/core.cljs +++ b/src/status_im/ios/core.cljs @@ -20,7 +20,9 @@ [status-im.accounts.login.screen :refer [login]] [status-im.accounts.recover.screen :refer [recover]] [status-im.accounts.screen :refer [accounts]] - [status-im.transactions.screen :refer [confirm]] + [status-im.transactions.screens.confirmation-success :refer [confirmation-success]] + [status-im.transactions.screens.pending-transactions :refer [pending-transactions]] + [status-im.transactions.screens.transaction-details :refer [transaction-details]] [status-im.chats-list.screen :refer [chats-list]] [status-im.new-chat.screen :refer [new-chat]] [status-im.new-group.screen-private :refer [new-group @@ -131,7 +133,9 @@ (let [component (case @modal-view :qr-scanner qr-scanner :qr-code-view qr-code-view - :confirm confirm + :pending-transactions pending-transactions + :transaction-details transaction-details + :confirmation-success confirmation-success :contact-list-modal contact-list-modal)] [component])]])]))))}))) diff --git a/src/status_im/transactions/handlers.cljs b/src/status_im/transactions/handlers.cljs index 93edf230e2..bf9f20721f 100644 --- a/src/status_im/transactions/handlers.cljs +++ b/src/status_im/transactions/handlers.cljs @@ -22,7 +22,7 @@ ;; && :navigation-replace <- on success -(defmethod nav/preload-data! :confirm +(defmethod nav/preload-data! :pending-transactions [{:keys [transactions-queue] :as db} _] (-> db (assoc :transactions transactions-queue @@ -30,6 +30,14 @@ :wrong-password? false) (assoc-in [:confirm-transactions :password] ""))) +(defmethod nav/preload-data! :transaction-details + [db [_ _ transaction]] + (-> db + (assoc :selected-transaction transaction + :wrong-password-counter 0 + :wrong-password? false) + (assoc-in [:confirm-transactions :password] ""))) + (defn on-unlock [ids password] (dispatch [:set :wrong-password? false]) @@ -47,6 +55,11 @@ (let [ids (keys transactions)] (on-unlock ids password))))) +(register-handler :accept-transaction + (u/side-effect! + (fn [{:keys [transactions]} [_ password id]] + (on-unlock (list id) password)))) + (register-handler :deny-transactions (u/side-effect! (fn [{:keys [transactions]}] @@ -56,8 +69,7 @@ (dispatch [::remove-pending-messages messages-ids]) (dispatch [::remove-transactions ids]) (doseq [id ids] - (dispatch [::discard-transaction id])) - (dispatch [:navigate-back]))))) + (dispatch [::discard-transaction id])))))) (register-handler :deny-transaction (u/side-effect! @@ -80,9 +92,6 @@ (update :transactions-queue #(apply dissoc % hashes))))) (register-handler ::remove-transaction - (after (fn [{:keys [modal]}] - (when (= :confirm modal) - (dispatch [:navigate-back])))) (fn [db [_ hash]] (-> db (update :transactions dissoc hash) @@ -119,21 +128,22 @@ (status/discard-transaction id))))) (register-handler ::transaction-queued - (after #(dispatch [:navigate-to-modal :confirm])) + (after #(dispatch [:navigate-to-modal :pending-transactions])) (fn [db [_ {:keys [id message_id args]}]] - (let [{:keys [from to value]} args] + (let [{:keys [from to value data]} args] (if (valid-hex? to) (let [transaction {:id id :from from :to to :value (.toDecimal js/Web3.prototype value) + :data data :message-id message_id}] (assoc-in db [:transactions-queue id] transaction)) db)))) (register-handler :transaction-completed (u/side-effect! - (fn [{:keys [transactions]} [_ {:keys [id response]}]] + (fn [{:keys [transactions modal]} [_ {:keys [id response]}]] (let [{:keys [hash error] :as parsed-response} (t/json->clj response) {:keys [message-id]} (transactions id)] (log/debug :parsed-response parsed-response) @@ -144,7 +154,10 @@ :message-id message-id}]) (dispatch [::check-completed-transaction! {:message-id message-id}])) - (dispatch [::remove-transaction id]))))))) + (dispatch [::remove-transaction id])) + (when (or (= modal :pending-transactions) + (= modal :transaction-details)) + (dispatch [:navigate-to-modal :confirmation-success]))))))) (register-handler ::add-transactions-hash (fn [db [_ {:keys [id hash message-id]}]] @@ -189,10 +202,15 @@ (not= discard-code error_code) (do (when message_id (dispatch [::remove-pending-message message_id])) + (dispatch [:clear-selected-transaction]) (dispatch [::remove-transaction id])) :else nil)))) +(register-handler :clear-selected-transaction + (fn [db _] + (dissoc db :selected-transaction))) + (def attempts-limit 3) (register-handler :set-wrong-password! diff --git a/src/status_im/transactions/screen.cljs b/src/status_im/transactions/screen.cljs deleted file mode 100644 index 29356384b4..0000000000 --- a/src/status_im/transactions/screen.cljs +++ /dev/null @@ -1,62 +0,0 @@ -(ns status-im.transactions.screen - (:require-macros [status-im.utils.views :refer [defview]]) - (:require [re-frame.core :refer [subscribe dispatch]] - [status-im.components.react :refer [view - text - image - icon - scroll-view - touchable-highlight - touchable-opacity]] - [status-im.components.styles :refer [icon-ok - icon-close]] - [status-im.components.carousel.carousel :refer [carousel]] - [status-im.components.status-bar :refer [status-bar]] - [status-im.components.toolbar.view :refer [toolbar]] - [status-im.components.toolbar.styles :refer [toolbar-title-container]] - [status-im.components.text-field.view :refer [text-field]] - [status-im.transactions.views.transaction-page :refer [transaction-page]] - [status-im.transactions.styles :as st] - [status-im.i18n :refer [label label-pluralize]] - [clojure.string :as s])) - -(defview confirm [] - [transactions [:transactions] - {:keys [password]} [:get :confirm-transactions] - wrong-password? [:wrong-password?]] - [view st/transactions-screen - [status-bar {:type :transparent}] - [toolbar - {:style st/transactions-toolbar - :nav-action {:image {:source {:uri :icon_close_white} - :style icon-close} - :handler #(dispatch [:deny-transactions])} - :custom-content [view {:style toolbar-title-container} - [text {:style st/toolbar-title-text} - (label-pluralize (count transactions) :t/confirm-transactions)]] - :actions [{:image {:source {:uri (if-not (s/blank? password) - :icon_ok - :icon_ok_disabled_inversed)} - :style icon-ok} - :handler (when-not (s/blank? password) - #(dispatch [:accept-transactions password]))}]}] - [view st/carousel-container - [carousel {:pageStyle st/carousel-page-style - :gap 8 - :sneak 16 - :count (count transactions)} - (when transactions - (for [transaction transactions] - [transaction-page transaction]))]] - [view st/form-container - [text-field - {:editable true - :error (when wrong-password? (label :t/wrong-password)) - :error-color :#ffffff80 #_:#7099e6 - :label (label :t/password) - :secure-text-entry true - :label-color :#ffffff80 - :line-color :white - :auto-capitalize :none - :input-style st/password-style - :on-change-text #(dispatch [:set-in [:confirm-transactions :password] %])}]]]) diff --git a/src/status_im/transactions/screens/confirmation-success.cljs b/src/status_im/transactions/screens/confirmation-success.cljs new file mode 100644 index 0000000000..aaa7346191 --- /dev/null +++ b/src/status_im/transactions/screens/confirmation-success.cljs @@ -0,0 +1,25 @@ +(ns status-im.transactions.screens.confirmation-success + (:require-macros [status-im.utils.views :refer [defview]]) + (:require [re-frame.core :as rf] + [status-im.components.react :as rn] + [status-im.components.sticky-button :as sticky-button] + [status-im.components.status-bar :as status-bar] + [status-im.transactions.views.list-item :as transactions-list-item] + [status-im.transactions.styles.screens :as st] + [status-im.i18n :as i18n])) + +(defview confirmation-success [] + [quantity [:get :confirmed-transactions-count]] + [rn/view {:style st/success-screen} + [status-bar/status-bar {:type :transparent}] + [rn/view {:style st/success-screen-content-container} + [rn/view {:style st/success-icon-container} + [rn/image {:source {:uri :icon_ok_white} + :style st/success-icon}]] + [rn/view + [rn/text {:style st/success-text} + (i18n/label-pluralize quantity :t/transactions-confirmed)]]] + [sticky-button/sticky-button + (i18n/label :t/got-it) + #(do (rf/dispatch [:navigate-back]) + (rf/dispatch [:set :confirmed-transactions-count 0]))]]) diff --git a/src/status_im/transactions/screens/pending-transactions.cljs b/src/status_im/transactions/screens/pending-transactions.cljs new file mode 100644 index 0000000000..5380533b01 --- /dev/null +++ b/src/status_im/transactions/screens/pending-transactions.cljs @@ -0,0 +1,69 @@ +(ns status-im.transactions.screens.pending-transactions + (:require-macros [status-im.utils.views :refer [defview]]) + (:require [re-frame.core :as rf] + [status-im.components.common.common :as common] + [status-im.components.react :as rn] + [status-im.components.sticky-button :as sticky-button] + [status-im.components.status-bar :as status-bar] + [status-im.components.toolbar-new.actions :as act] + [status-im.components.toolbar-new.view :as toolbar] + [status-im.transactions.views.list-item :as transactions-list-item] + [status-im.transactions.views.password-form :as password-form] + [status-im.transactions.styles.screens :as st] + [status-im.utils.listview :as lw] + [status-im.utils.platform :as platform] + [status-im.i18n :as i18n])) + +(defn toolbar-view [transactions] + [toolbar/toolbar + {:background-color st/transactions-toolbar-background + :nav-action (act/close-white #(do (rf/dispatch [:deny-transactions]) + (rf/dispatch [:navigate-back]))) + :border-style st/toolbar-border + :custom-content [rn/view {:style st/toolbar-title-container} + [rn/text {:style st/toolbar-title-text + :font :toolbar-title} + (i18n/label :t/pending-transactions)] + [rn/text {:style st/toolbar-title-count + :font :toolbar-title} + (count transactions)]]}]) + +(defn render-separator-fn [transactions-count] + (fn [_ row-id _] + (when (< row-id (dec transactions-count)) + (rn/list-item + ^{:key row-id} + [common/separator {} st/transactions-list-separator])))) + +(defn render-row-fn [row _ _] + (rn/list-item + [rn/touchable-highlight {:on-press #(rf/dispatch [:navigate-to-modal :transaction-details row])} + [rn/view + [transactions-list-item/view row]]])) + +(defview pending-transactions [] + [transactions [:transactions] + {:keys [password]} [:get :confirm-transactions] + confirmed? [:get-in [:transactions-list-ui-props :confirmed?]]] + + {:component-did-update #(when-not (seq transactions) (rf/dispatch [:navigate-back])) + :component-will-unmount #(rf/dispatch [:set-in [:transactions-list-ui-props :confirmed?] false])} + + [(if platform/ios? rn/keyboard-avoiding-view rn/view) (merge {:behavior :padding} st/transactions-screen) + [status-bar/status-bar {:type (if platform/ios? :transparent :main)}] + [toolbar-view transactions] + [rn/view {:style st/transactions-screen-content-container} + [rn/list-view {:style st/transactions-list + :dataSource (lw/to-datasource transactions) + :renderSeparator (render-separator-fn (count transactions)) + :renderRow render-row-fn}] + (when confirmed? + [password-form/view (count transactions)])] + (let [confirm-text (if confirmed? + (i18n/label :t/confirm) + (i18n/label-pluralize (count transactions) :t/confirm-transactions)) + confirm-fn (if confirmed? + #(do (rf/dispatch [:accept-transactions password]) + (rf/dispatch [:set :confirmed-transactions-count (count transactions)])) + #(rf/dispatch [:set-in [:transactions-list-ui-props :confirmed?] true]))] + [sticky-button/sticky-button confirm-text confirm-fn])]) diff --git a/src/status_im/transactions/screens/transaction-details.cljs b/src/status_im/transactions/screens/transaction-details.cljs new file mode 100644 index 0000000000..a8d7ad2a15 --- /dev/null +++ b/src/status_im/transactions/screens/transaction-details.cljs @@ -0,0 +1,70 @@ +(ns status-im.transactions.screens.transaction-details + (:require-macros [status-im.utils.views :refer [defview]]) + (:require [re-frame.core :as rf] + [status-im.components.react :as rn] + [status-im.components.common.common :as common] + [status-im.components.sticky-button :as sticky-button] + [status-im.components.status-bar :as status-bar] + [status-im.components.toolbar-new.actions :as act] + [status-im.components.toolbar-new.view :as toolbar] + [status-im.i18n :as i18n] + [status-im.transactions.styles.screens :as st] + [status-im.transactions.views.list-item :as transactions-list-item] + [status-im.transactions.views.password-form :as password-form] + [status-im.utils.platform :as platform])) + +(defn toolbar-view [] + [toolbar/toolbar + {:background-color st/transactions-toolbar-background + :nav-action (act/back-white #(rf/dispatch [:navigate-to-modal :pending-transactions])) + :border-style st/toolbar-border + :custom-content [rn/view {:style st/toolbar-title-container} + [rn/text {:style st/toolbar-title-text + :font :toolbar-title} + (i18n/label :t/transaction)]]}]) + +(defn detail-item [title content name?] + [rn/view {:style st/details-item} + [rn/text {:style st/details-item-title} title] + [rn/text {:style (st/details-item-content name?) + :number-of-lines 1} + content]]) + +(defn detail-data [content] + [rn/view {:style st/details-data} + [rn/text {:style st/details-data-title} (i18n/label :t/data)] + [rn/text {:style st/details-data-content} content]]) + +(defview details [{:keys [to data] :as transaction}] + [current-account [:get-current-account] + recipient [:contact-by-address to]] + (let [recipient-name (or (:name recipient) to)] + [rn/view + [detail-item (i18n/label :t/to) recipient-name true] + [detail-item (i18n/label :t/from) (:name current-account) true] + [detail-data data]])) + +(defview transaction-details [] + [{:keys [id] :as transaction} [:get :selected-transaction] + {:keys [password]} [:get :confirm-transactions] + confirmed? [:get-in [:transaction-details-ui-props :confirmed?]]] + + {:component-did-update #(when-not transaction (rf/dispatch [:navigate-to-modal :pending-transactions])) + :component-will-unmount #(rf/dispatch [:set-in [:transaction-details-ui-props :confirmed?] false])} + + [(if platform/ios? rn/keyboard-avoiding-view rn/view) (merge {:behavior :padding} st/transactions-screen) + [status-bar/status-bar {:type (if platform/ios? :transparent :main)}] + [toolbar-view] + [rn/scroll-view st/details-screen-content-container + [transactions-list-item/view transaction #(rf/dispatch [:navigate-to-modal :pending-transactions])] + (when platform/ios? [common/separator {} st/details-separator]) + [details transaction]] + (when confirmed? [password-form/view 1]) + (let [confirm-text (if confirmed? + (i18n/label :t/confirm) + (i18n/label-pluralize 1 :t/confirm-transactions)) + confirm-fn (if confirmed? + #(do (rf/dispatch [:accept-transaction password id]) + (rf/dispatch [:set :confirmed-transactions-count 1])) + #(rf/dispatch [:set-in [:transaction-details-ui-props :confirmed?] true]))] + [sticky-button/sticky-button confirm-text confirm-fn])]) diff --git a/src/status_im/transactions/styles.cljs b/src/status_im/transactions/styles.cljs deleted file mode 100644 index cfb7ad8cf5..0000000000 --- a/src/status_im/transactions/styles.cljs +++ /dev/null @@ -1,105 +0,0 @@ -(ns status-im.transactions.styles - (:require [status-im.components.styles :refer [color-gray - color-black]])) - -(def transactions-screen - {:flex 1 - :backgroundColor "#828b92"}) - -(def transactions-toolbar - {:backgroundColor "#828b92" - :elevation 0}) - -(def toolbar-title-text - {:color :white - :fontSize 16}) - -(def carousel-page-style - {}) - -(def form-container - {:flex 1 - :paddingLeft 16}) - -(def password-style - {:color :white - :font-size 12}) - -;transaction-page - -(def transaction-page - {:flex 1 - :backgroundColor "#f3f4f4"}) - -(def title-bar - {:backgroundColor :white - :height 39 - :justifyContent :center}) - -(def title-bar-text - {:color "#838c93" - :font-size 13 - :margin-left 12 - :margin-right 30}) - -(def icon-close-container - {:position :absolute - :right 12 - :top 13}) - -(def icon-close - {:width 12 - :height 12}) - -(def transaction-info-container - {:flex 1 - :paddingTop 6}) - -(def scroll-view-container - {:flex 1}) - -(def scroll-view - {:flex 1 - :height 175}) - -(def scroll-view-content - {:paddingVertical 6}) - -(def transaction-info-row - {:flex 1 - :flexDirection :row}) - -(def transaction-info-column-title - {:flex 0.4 - :flexDirection :column - :paddingHorizontal 6}) - -(def transaction-info-column-value - {:flex 0.6 - :flexDirection :column - :paddingHorizontal 6}) - -(def transaction-info-item - {:flex 1 - :padding 6}) - -(def transaction-info-title - {:textAlign :right - :color color-gray - :fontSize 14 - :lineHeight 20}) - -(def transaction-info-value - {:color color-black - :fontSize 14 - :lineHeight 20 -}) - -(def scroll-view-item - {:flex 1 - :height 20 - :padding 6 }) - -(def carousel-container - {:min-height 215 - :flex 1}) diff --git a/src/status_im/transactions/styles/list_item.cljs b/src/status_im/transactions/styles/list_item.cljs new file mode 100644 index 0000000000..c29d298dcd --- /dev/null +++ b/src/status_im/transactions/styles/list_item.cljs @@ -0,0 +1,52 @@ +(ns status-im.transactions.styles.list-item + (:require-macros [status-im.utils.styles :refer [defstyle]]) + (:require [status-im.components.styles :as st])) + +(def item + {:padding-vertical 20 + :padding-horizontal 16 + :flex 1 + :flex-direction :row + :align-items :center}) + +(def item-photo + {:width 86 + :height 48 + :border-radius 100 + :background-color st/color-dark-blue-3 + :flex-direction :row + :align-items :center}) + +(def item-info + {:margin-left 16 + :flex 1}) + +(defstyle item-info-recipient + {:color st/color-light-blue + :font-size 15 + :flex-shrink 1 + :android {:margin-bottom 5} + :ios {:margin-bottom 4}}) + +(defstyle item-info-amount + {:color st/color-white + :android {:font-size 19} + :ios {:font-size 20}}) + +(def item-deny-btn + {:margin-left 16}) + +(def item-deny-btn-icon + {:width 24 + :height 24}) + +(def photo-size 48) + +(def photo-placeholder + {:width 48 + :height 48}) + +(def item-photo-icon + {:margin-left 4 + :width 24 + :height 24}) diff --git a/src/status_im/transactions/styles/password_form.cljs b/src/status_im/transactions/styles/password_form.cljs new file mode 100644 index 0000000000..003f151ab1 --- /dev/null +++ b/src/status_im/transactions/styles/password_form.cljs @@ -0,0 +1,30 @@ +(ns status-im.transactions.styles.password-form + (:require-macros [status-im.utils.styles :refer [defnstyle defstyle]]) + (:require [status-im.components.styles :as st])) + +(defnstyle password-container [error?] + {:margin-bottom (if error? 42 24) + :padding-left 16 + :ios {:border-top-width 1 + :border-top-color st/color-white-transparent-2}}) + +(def password-title + {:color st/color-white + :font-size 15 + :margin-top 16 + :margin-bottom 12}) + +(def password-input-wrapper + {:position :relative + :height 52 + :padding-top 0 + :padding-bottom 0 + :margin-bottom 0}) + +(defstyle password-input + {:color :white + :height 52 + :padding-left 0 + :padding-top 24 + :android {:font-size 16} + :ios {:font-size 17}}) diff --git a/src/status_im/transactions/styles/screens.cljs b/src/status_im/transactions/styles/screens.cljs new file mode 100644 index 0000000000..dd3d9437ad --- /dev/null +++ b/src/status_im/transactions/styles/screens.cljs @@ -0,0 +1,129 @@ +(ns status-im.transactions.styles.screens + (:require-macros [status-im.utils.styles :refer [defstyle]]) + (:require [status-im.components.styles :as st] + [status-im.utils.platform :as platform])) + +;; common + +(def transactions-toolbar-background (if platform/ios? + st/color-dark-blue-2 + st/color-dark-blue-1)) + +(defstyle toolbar-title-container + {:flex 1 + :flex-direction :row + :align-self :stretch + :padding-left 30 + :ios {:align-items :center + :justify-content :center + :padding-bottom 16}}) + +(def toolbar-title-text + {:color st/color-white + :font-size 17}) + +(defstyle toolbar-title-count + {:color st/color-white + :font-size 17 + :margin-left 8 + :android {:opacity 0.2} + :ios {:opacity 0.6}}) + +(defstyle toolbar-border + {:ios {:background-color st/color-white + :opacity 0.1}}) + +;; pending-transactions + +(def transactions-screen + {:flex 1 + :background-color st/color-dark-blue-2}) + +(def transactions-screen-content-container + {:flex 1 + :justify-content :space-between}) + +(defstyle transactions-list + {:flex 1 + :android {:padding-vertical 8}}) + +(def transactions-list-separator + {:margin-left 16 + :opacity 0.1}) + +;; transaction-details + +(defstyle details-screen-content-container + {:flex 1 + :android {:padding-top 8}}) + +(def details-separator + {:margin-bottom 10 + :margin-left 16 + :opacity 0.1}) + +(def details-item + {:margin-top 10 + :padding-left 16 + :padding-right 16 + :flex-direction :row}) + +(defstyle details-item-title + {:width 80 + :font-size 15 + :color st/color-white + :android {:opacity 0.2 + :margin-right 24} + :ios {:opacity 0.5 + :margin-right 8 + :text-align :right}}) + +(defn details-item-content [name?] + {:font-size 15 + :flex-shrink 1 + :color (if name? st/color-light-blue st/color-white)}) + +(defstyle details-data + {:margin-top 16 + :padding 16 + :background-color st/color-dark-blue-3 + :ios {:margin-horizontal 16}}) + +(defstyle details-data-title + {:font-size 15 + :color st/color-white + :android {:opacity 0.2} + :ios {:opacity 0.5}}) + +(def details-data-content + {:font-size 15 + :color st/color-white + :margin-top 8}) + +;; confirmation-success + +(def success-screen + {:flex 1 + :background-color st/color-dark-blue-2}) + +(def success-screen-content-container + {:flex 1 + :align-items :center + :justify-content :center}) + +(def success-icon-container + {:background-color st/color-light-blue + :border-radius 100 + :height 133 + :width 133 + :justify-content :center + :align-items :center}) + +(def success-icon + {:height 40 + :width 54}) + +(def success-text + {:font-size 17 + :color st/color-light-blue3 + :margin-top 26}) diff --git a/src/status_im/transactions/views/list_item.cljs b/src/status_im/transactions/views/list_item.cljs new file mode 100644 index 0000000000..b20f70a32e --- /dev/null +++ b/src/status_im/transactions/views/list_item.cljs @@ -0,0 +1,39 @@ +(ns status-im.transactions.views.list-item + (:require-macros [status-im.utils.views :refer [defview]]) + (:require [re-frame.core :as rf] + [status-im.components.chat-icon.screen :as chat-icon] + [status-im.components.react :as rn] + [status-im.i18n :as i18n] + [status-im.transactions.styles.list-item :as st])) + +(defview item-image [contact] + [rn/view {:style st/item-photo} + (if-not (empty? contact) + [chat-icon/chat-icon (:photo-path contact) {:size st/photo-size}] + [rn/view {:style st/photo-placeholder}]) + [rn/image {:source {:uri :icon_arrow_left_white} + :style st/item-photo-icon}]]) + +(defn item-info [recipient-name value] + [rn/view {:style st/item-info} + [rn/text {:style st/item-info-recipient + :number-of-lines 1} + recipient-name] + [rn/text {:style st/item-info-amount} value]]) + +(defn deny-btn [transaction-id on-deny] + [rn/touchable-highlight {:on-press #(do (rf/dispatch [:deny-transaction transaction-id]) + (when on-deny (on-deny)))} + [rn/view {:style st/item-deny-btn} + [rn/image {:source {:uri :icon_close_white} + :style st/item-deny-btn-icon}]]]) + +(defview view [{:keys [to value id] :as transaction} on-deny] + [recipient [:contact-by-address to]] + (let [eth-value (.fromWei js/Web3.prototype value "ether") + value (str (i18n/label-number eth-value) " ETH") + recipient-name (or (:name recipient) to)] + [rn/view {:style st/item} + [item-image recipient] + [item-info recipient-name value] + [deny-btn id on-deny]])) diff --git a/src/status_im/transactions/views/password_form.cljs b/src/status_im/transactions/views/password_form.cljs new file mode 100644 index 0000000000..3d6387e424 --- /dev/null +++ b/src/status_im/transactions/views/password_form.cljs @@ -0,0 +1,29 @@ +(ns status-im.transactions.views.password-form + (:require-macros [status-im.utils.views :refer [defview]]) + (:require [re-frame.core :as rf] + [status-im.components.react :as rn] + [status-im.components.styles :as common-st] + [status-im.components.text-field.view :as text-field] + [status-im.transactions.styles.password-form :as st] + [status-im.i18n :as i18n])) + +(defview view [transaction-quantity] + [wrong-password? [:wrong-password?]] + (let [error? wrong-password?] + [rn/view (st/password-container error?) + [rn/text {:style st/password-title} + (i18n/label-pluralize transaction-quantity :t/enter-password-transactions)] + [text-field/text-field + {:editable true + :secure-text-entry true + :label-hidden? true + :error (when error? (i18n/label :t/wrong-password)) + :error-color common-st/color-light-red2 + :placeholder (i18n/label :t/password) + :placeholder-text-color common-st/color-white-transparent + :line-color common-st/color-light-blue + :focus-line-height 2 + :wrapper-style st/password-input-wrapper + :input-style st/password-input + :auto-focus true + :on-change-text #(rf/dispatch [:set-in [:confirm-transactions :password] %])}]])) diff --git a/src/status_im/transactions/views/transaction_page.cljs b/src/status_im/transactions/views/transaction_page.cljs deleted file mode 100644 index b72158f6f3..0000000000 --- a/src/status_im/transactions/views/transaction_page.cljs +++ /dev/null @@ -1,50 +0,0 @@ -(ns status-im.transactions.views.transaction-page - (:require-macros [status-im.utils.views :refer [defview]]) - (:require [re-frame.core :refer [subscribe dispatch]] - [status-im.components.react :refer [view - text - image - icon - scroll-view - touchable-highlight - touchable-opacity]] - [status-im.components.styles :refer [icon-close]] - [status-im.transactions.styles :as st] - [status-im.i18n :refer [label label-pluralize label-number]])) - -(defn title-bar [title id] - [view st/title-bar - [text {:style st/title-bar-text - :font :medium - :number-of-lines 1} - title] - [touchable-highlight {:style st/icon-close-container - :on-press #(dispatch [:deny-transaction id])} - [view [image {:source {:uri :icon_close_gray} - :style st/icon-close}]]]]) - -(defn transaction-info [index [name value]] - [view {:style st/transaction-info-item - :key index} - [view {:style st/transaction-info-row} - [view st/transaction-info-column-title - [text {:style st/transaction-info-title} name]] - [view st/transaction-info-column-value - [text {:style st/transaction-info-value} value]]]]) - -(defview transaction-page [{:keys [id from to value] :as transaction}] - [{:keys [name] :as contact} [:contact-by-address to]] - (let [eth-value (.fromWei js/Web3.prototype value "ether") - title (str (label-number eth-value) " ETH to " (or name to)) - transactions-info [[(label :t/status) (label :t/pending-confirmation)] - [(label :t/recipient) (or name to)] - [(label :t/value) (str (label-number eth-value) " ETH")]]] - [view {:style st/transaction-page - :key id} - [title-bar title id] - [view st/scroll-view-container - [scroll-view {:style st/scroll-view - :contentContainerStyle st/scroll-view-content - :showsVerticalScrollIndicator true - :scrollEnabled true} - (map-indexed transaction-info transactions-info)]]])) diff --git a/src/status_im/translations/en.cljs b/src/status_im/translations/en.cljs index b5258992dd..13cb5507a4 100644 --- a/src/status_im/translations/en.cljs +++ b/src/status_im/translations/en.cljs @@ -269,15 +269,27 @@ :not-enough-eth (str "Not enough ETH on balance " "({{balance}} ETH)") ;transactions + :confirm "Confirm" :confirm-transactions {:one "Confirm transaction" :other "Confirm {{count}} transactions" :zero "No transactions"} + :transactions-confirmed {:one "Transaction confirmed" + :other "{{count}} transactions confirmed" + :zero "No transactions confirmed"} + :transaction "Transaction" + :pending-transactions "Pending transactions" + :enter-password-transactions {:one "Enter your password to confirm the transaction" + :other "Enter your password to confirm the transactions"} :status "Status" :pending-confirmation "Pending confirmation" :recipient "Recipient" :one-more-item "One more item" :fee "Fee" :value "Value" + :to "To" + :from "From" + :data "Data" + :got-it "Got it" ;:webview :web-view-error "oops, error"})