From 2c09cc18d71cdc640104cc228d1589a3080460f3 Mon Sep 17 00:00:00 2001 From: Robert McQueen Date: Thu, 25 Jun 2015 10:35:06 -0700 Subject: [PATCH] Add attachement icon to collapsed message if message has attachement Summary: Adds attachment icon to collased message if message has attachment. I just copied the attachment icon in the thread-list to the message-list namespace in the static directory. If you want to do it another way, feel free to update Test Plan: Tested locally. Not sure if this is worth a test, but I can write one if you want. Reviewers: bengotow Reviewed By: bengotow Maniphest Tasks: T2085 Differential Revision: https://phab.nylas.com/D1687 --- .../message-list/lib/message-item.cjsx | 5 +++++ .../message-list/stylesheets/message-list.less | 11 +++++++++++ .../images/message-list/icon-attachment-@2x.png | Bin 0 -> 858 bytes 3 files changed, 16 insertions(+) create mode 100644 static/images/message-list/icon-attachment-@2x.png diff --git a/internal_packages/message-list/lib/message-item.cjsx b/internal_packages/message-list/lib/message-item.cjsx index dc4b7a23a..68c938e85 100644 --- a/internal_packages/message-list/lib/message-item.cjsx +++ b/internal_packages/message-list/lib/message-item.cjsx @@ -54,6 +54,10 @@ class MessageItem extends React.Component @_renderFull() _renderCollapsed: => + attachmentIcon = [] + if @props.message.files.length > 0 + attachmentIcon =
+
@@ -65,6 +69,7 @@ class MessageItem extends React.Component
+ {attachmentIcon}
diff --git a/internal_packages/message-list/stylesheets/message-list.less b/internal_packages/message-list/stylesheets/message-list.less index 7cfa8065a..657408dbd 100644 --- a/internal_packages/message-list/stylesheets/message-list.less +++ b/internal_packages/message-list/stylesheets/message-list.less @@ -167,6 +167,17 @@ color: @text-color-very-subtle; } + .collapsed-attachment { + width:15px; + height:15px; + background-size: 15px; + background-repeat: no-repeat; + background-position:center; + padding:12px; + margin-left: 0.5em; + background-image:url(../static/images/message-list/icon-attachment-@2x.png); + } + .collapsed-from { font-weight: @font-weight-semi-bold; color: @text-color-very-subtle; diff --git a/static/images/message-list/icon-attachment-@2x.png b/static/images/message-list/icon-attachment-@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..8823351d1b90eb778adc61f6c8c4481408397fb1 GIT binary patch literal 858 zcmV-g1Eu_lP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv00000008+zyMF)x010qNS#tmY79{`x79{~mQY7#I00O>AL_t(o!@bu}s8v-I z$MMg7$jgMX|A7?}1q~V~)gUs`7eWnQqb9W?(1JoVNPYBY)F5b(8AQD@iqMKhiGx5x zs3t{!C=&`nBm}cCh@_wh2}v8AedBhy_uPB#JG5YP_U5d!zQ42f-fN%J(XwUc71)AV zEXN|8zz29KBEIeQ@3aixglBQ?5SKG}1)C${G)%P!e-$s{9PGwjxDMB2J-#lyjo6u) z9VI<&z_;O{GTa>z_x8CQ&dgnSsv#|+api)hpeelA z6Zi|4VD-cTCWMQKllZg@S572gQh1LYE7uDe3+RKtH31whF4tcgEy4lt^-bZK*)2?$ z;pVY3&<4EN#sWWr17iso1<%Z@GIQk^aqh?SIE%+3;><_^W592~H#nG?Q4?nkcBrc1 z&WPB{h*F%H&y4~95EtP%4%Wcm#}d4(DnzI`j0$|~2>3_1P_?aQBI5XfI5XJS1K$)8 zXKMxY!QaFKBj9Ty;)ka2fdc+dIDKni4EQX*XbVoyaolrC4TKllfoc3!1HT=63w$1r z41@ohfz0e(nFHaOIgLxpaCIASn99s$SXahJhP*kPSKj{Th&a>+yqkfCRo`&mh_x zzI$Iag?Fc5N$H;&GuojQ1w&O8;hHY5Y6yD9iPq-S_8dA&qM4ZM8r7hT|@JZ?4 z*G9le1nesP+04AN&N(xuGxOcdT-%m_P6@mRcjI^56A}9dz!&2^+<`x^bdotACSWN( zMt6Vj!#g;N#kfUPFP4}4+aqGG8LCD=5ph1=D47^$f8z0om~R9A9|1i=ZdLtE&S05p kdwz%gcr7AMv;~KM08T_-c1#cqD*ylh07*qoM6N<$g5jKdsQ>@~ literal 0 HcmV?d00001