From e2717ade98b152e754250b2a0c9f4e78693b1581 Mon Sep 17 00:00:00 2001 From: andrey Date: Mon, 23 Nov 2020 15:54:19 +0100 Subject: [PATCH] [#11438] Add "sent" message confirmations --- resources/images/icons/tiny_pending@2x.png | Bin 177 -> 271 bytes resources/images/icons/tiny_pending@3x.png | Bin 282 -> 312 bytes resources/images/icons/tiny_sent@2x.png | Bin 0 -> 340 bytes resources/images/icons/tiny_sent@3x.png | Bin 0 -> 478 bytes resources/images/icons/tiny_warning@2x.png | Bin 301 -> 202 bytes resources/images/icons/tiny_warning@3x.png | Bin 426 -> 261 bytes .../icons/tiny_warning_background@2x.png | Bin 0 -> 301 bytes .../icons/tiny_warning_background@3x.png | Bin 0 -> 426 bytes .../ui/screens/chat/message/command.cljs | 2 +- .../ui/screens/chat/message/message.cljs | 28 +++++++++++++----- .../ui/screens/chat/styles/message/audio.cljs | 6 ++-- .../screens/chat/styles/message/message.cljs | 10 ++----- 12 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 resources/images/icons/tiny_sent@2x.png create mode 100644 resources/images/icons/tiny_sent@3x.png create mode 100644 resources/images/icons/tiny_warning_background@2x.png create mode 100644 resources/images/icons/tiny_warning_background@3x.png diff --git a/resources/images/icons/tiny_pending@2x.png b/resources/images/icons/tiny_pending@2x.png index 7596d1ef953a033d17f20f107cf8048caac452bd..147525453913200507db76f586fba54716a3d58c 100644 GIT binary patch delta 254 zcmdnU*v~XUvYw5BfuXpn>I;zKEbxddW?&Fg1z|?dAe9e5LB`@BcPEB*=VV?2IV|ap zzK#qG8~eHcB(eheOFUg1Ln;{GPBi2?vn69g~iz;;PPn%2>p8`pyBh zwR2OuT3SSA?>9KQ>5Q1??Eeo8nd=kn)^I4c2$XLsjnVsX&)y(zL-W+)caxu(_k2ie zF#VK2Dc<1FY)-Qi_1EUkeNuTyXx>(jQ?lL BV?qD` delta 160 zcmV;R0AK%)0fG`jQrwv7GNWeDYH|>}X z;@2uufxii{v5puzv*K{f_8H;~<8vOANHM(w3#*|3 O0000O>_%)p>%0m6)~(+m@Uf{evM?oJHr&dIz4a#+$G zeH|GXHuiJ>Nn{1`&w9EzhEy=Vy}VGU$wA=Q$D`~U1$1s@n7u98-JiPr^2Uo9QX2#+ z1Y^>6G!~Sv@tymB{hd4K%nPhHYcm0LGceQz)hF@t9WJ=2Jbzv2B$e$`{{;5u?6Nbd zk3aeTi^uZp^*@(O%#ga!AD>#cC-{Ybm%~4m&yVLueJ)klKmF%Nztumdues52_Ga*D z<)6*Vr@4NL_SY3<&Ss83eaqqH%Fu~5k5?W|+x7WMmEn(+&f~TPi$mI;)lZcFexNr< qc-DW{x;xC~ie7V{MKgjO^Zzxk7QZo%vG(=HAik%opUXO@geCx1`Fywl delta 266 zcmV+l0rmd40-6Gl8Gi%-008|9F$@3z0O3hQK~#9!?UX$VgFqC72Lua25H?LZtF00u zcmXl(-ob5c;{|dJPvcQMf=4h!*3JH@V3X#3Qx43qkM|ZJ2!bF8;uIMq-e`~qJdPRy zJm5rNxPl=*if=GsUNoYyoCFTgLNzZH=@cZFdy4l@vY&cPC>G_ zM-ro+zjW60w?{8;O>Zjvfy>b)zopr0BXm5_W%F@ literal 0 HcmV?d00001 diff --git a/resources/images/icons/tiny_sent@3x.png b/resources/images/icons/tiny_sent@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..4c8bd23abe2900e33faebfddde243d3fe0066514 GIT binary patch literal 478 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC&H|6fVg?393lL^>oo1K-6l5$8 za(7}_cTVOdki(Mh=f_J}JGMKV2NUQ$! z<>kVAYaa^b%%3Oc=jeO>TXcJV8Cztal1-<&pP~PzIT3xI_WzZ&cIkU;0Yv*tV$1tC zUA8Iq)n+`D9by`PIc;;Lf91QbFb0AS#g*%x_YvWb_J(uB_k zUgq@@{=N}tdZlu6r~j@soQcO5iFfuHyq+(y=$?g@(za*6cdwZ3S@O>$fKB0-;ME&^ zcO!c16s||E_+Kd+<^8cyhmFl{J>%sUGX%u+Pidd}xS#i2q0Dh0nt7i8@bM*YR_)SK Q21W;ir>mdKI;Vst0Ewi)asU7T literal 0 HcmV?d00001 diff --git a/resources/images/icons/tiny_warning@2x.png b/resources/images/icons/tiny_warning@2x.png index 007010fd25875e2e43131660d8ac6ec8b04c2d9a..f5b7436073ac8fc53c38748370ef24bb7349a8e0 100644 GIT binary patch delta 185 zcmZ3>bc%6;WIY=L14D6D)fXVeS>O>_%)lU~3c`$@K`I}Bf{evM?oJHr&dIz4a#+$G zeH|GXHuiJ>Nn{1`<2_v*Ln;{GUOULyU?AXfF>)gt_oX(S6Ja_hw65_+IJ(_9U2mYW zokvA+B7=m{XQ_#aQ`0AB1{!k(G%$%QX!tE=V>DG@*OmB$^)g02^BXr-@IE&Wceyj` hLLIkGeGX%T__6ge2Wt@9{J8MI?||;@&6J*ncqdTm=w>;i>`Lkv3cn zz>$wc&{n)~XSU*gtr)S;n0HY!w|(b`XELh@ z+}z;wXTFKmjgE(!i9q|d9h10f?7phg#wYz#?v)cMN~f5XFK{s9N?D9X9BADB{PoYH zW(C&&>|g9W($dxWqj7&t=EmFJnwvR2?l~1+yPb6 z!R~p+6}AODR-u<3(H%+4g$4ff3ycK5LlVK?J@M~hiLBEUwtp4g!@!^?if&ty)6Y?! zpy=q*Qn@#aI4V&@x#`YX8r@OV^b{3>QhVc3jUeuKPf;V-y~9nFAZ!V;DnWkjCC7NF z5`s;VygEUUb&#CkcTF&=6C`Pgr34wm1Enec^8_DHQ4)2wWkio_f`N6!{7-|Cr8QO- zm{T{9I%z###eZLg%-!p-%&PEt`kdg0002=Nkl1M2}nRf_OY%nAV9aXGxA5sC6Ai~_}9}w!@`5X z@G#J5%8h$Ca6}xsys?6f8gC#vC?z_12;qNbZDdI&WkXYj0 zC)C(5^IQcGgyE_I+>th14ZwS9=}Q2512C5Wc8T@UIGPP1)qxWf z2vb69@@14o=ZPdslc%ygS_+y;gFqNdnkkmZhrm=PFpRBC_mf7LibpR7 z5D2%^@4Y{pvvSDUR{ZNEKFV-+F5l;O%a00000NkvXXu0mjfl2m(1 literal 0 HcmV?d00001 diff --git a/resources/images/icons/tiny_warning_background@3x.png b/resources/images/icons/tiny_warning_background@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..6d1005d8cee9bac40b9b584626af15015d270efd GIT binary patch literal 426 zcmV;b0agBqP)Kf{YOn9!>-N4n4u{dBzpC1w2-vmmbj_Ny~)={`3os1inKO!QVac?_r6o z(-gK9-owD4CyH)clGD#oo}lRH(o(rMi#RG#M7inCSsL9@)$|kL|qQH>z(cTZ6x z*uBF|l^|>hvMND-?Ip)}sS<)slDs-Wkadup;CD?hsuLt>iKPS?!ULr#{__MMPf-$e zwq-<*Yl4Aw#QaZ#k)<_O7MN2vkUD8SUd3O9%-!p-%&PEt`] tree)) -(defn render-parsed-text-with-timestamp [{:keys [timestamp-str] :as message} tree] +(defn render-parsed-text-with-timestamp [{:keys [timestamp-str outgoing] :as message} tree] (let [elements (render-parsed-text message tree) timestamp [react/text {:style (style/message-timestamp-placeholder)} - (str " " timestamp-str)] + (str (if outgoing " " " ") timestamp-str)] last-element (peek elements)] ;; Using `nth` here as slightly faster than `first`, roughly 30% ;; It's worth considering pure js structures for this code path as diff --git a/src/status_im/ui/screens/chat/styles/message/audio.cljs b/src/status_im/ui/screens/chat/styles/message/audio.cljs index f30c340e7c..91ddd38893 100644 --- a/src/status_im/ui/screens/chat/styles/message/audio.cljs +++ b/src/status_im/ui/screens/chat/styles/message/audio.cljs @@ -43,7 +43,5 @@ :justify-content :space-between}) (defn timestamp [outgoing] - (merge (message.style/message-timestamp-text - false - outgoing - false) {:margin-left 40})) \ No newline at end of file + (merge (message.style/message-timestamp-text outgoing) + {:margin-left 40})) \ No newline at end of file diff --git a/src/status_im/ui/screens/chat/styles/message/message.cljs b/src/status_im/ui/screens/chat/styles/message/message.cljs index 812355e5bb..74249f1c31 100644 --- a/src/status_im/ui/screens/chat/styles/message/message.cljs +++ b/src/status_im/ui/screens/chat/styles/message/message.cljs @@ -28,23 +28,19 @@ :align-items align})) (def message-timestamp - {:font-size 10 - :align-self :flex-end}) + {:font-size 10}) (defn message-timestamp-placeholder [] (merge message-timestamp {:opacity 0 :color "rgba(0,0,0,0)"})) (defn message-timestamp-text - [justify-timestamp? outgoing rtl?] + [outgoing] (merge message-timestamp {:line-height 10 :color (if outgoing colors/white-transparent-70-persist - colors/gray)} - (when justify-timestamp? {:position :absolute - :bottom 9 ; 6 Bubble bottom, 3 message baseline - (if rtl? :left :right) 12}))) + colors/gray)})) (defn message-wrapper [{:keys [outgoing]}] (merge {:flex-direction :column}