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
This commit is contained in:
Robert McQueen 2015-06-25 10:35:06 -07:00
parent 28692ff5af
commit 2c09cc18d7
3 changed files with 16 additions and 0 deletions

View file

@ -54,6 +54,10 @@ class MessageItem extends React.Component
@_renderFull()
_renderCollapsed: =>
attachmentIcon = []
if @props.message.files.length > 0
attachmentIcon = <div className="collapsed-attachment"></div>
<div className={@props.className} onClick={@_toggleCollapsed}>
<div className="message-item-area">
<div className="collapsed-from">
@ -65,6 +69,7 @@ class MessageItem extends React.Component
<div className="collapsed-timestamp">
<MessageTimestamp date={@props.message.date} />
</div>
{attachmentIcon}
</div>
</div>

View file

@ -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;

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B