mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-27 18:37:53 +08:00
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:
parent
28692ff5af
commit
2c09cc18d7
3 changed files with 16 additions and 0 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
BIN
static/images/message-list/icon-attachment-@2x.png
Normal file
BIN
static/images/message-list/icon-attachment-@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 858 B |
Loading…
Reference in a new issue