From f4374ec5f6c45e07612523653485e8027a1d45cd Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Thu, 23 Jun 2016 01:17:22 +0300 Subject: [PATCH] add test message --- mail.css | 6 +++++- mail.js | 48 +++++++++++++++++++++++++++++++++--------------- 2 files changed, 38 insertions(+), 16 deletions(-) diff --git a/mail.css b/mail.css index 71f6902..041ca75 100644 --- a/mail.css +++ b/mail.css @@ -39,7 +39,6 @@ h1 img, h2 img, h3 img, h4 img, h5 img, h6 img a { font: inherit; - color: inherit; text-decoration: underline; outline: 0; } @@ -1222,6 +1221,11 @@ div flex: 1; } +.message-view .text pre, .message-view .text p +{ + margin: 0 0 .5em 0; +} + .message-view .blocked-images { flex: none; diff --git a/mail.js b/mail.js index 3bdf5b9..6221fda 100644 --- a/mail.js +++ b/mail.js @@ -35,6 +35,7 @@ var Store = { layout: 'message-on-right', quickReply: true, msg: null, + threads: false, listeners: {}, on: function(ev, cb) @@ -351,21 +352,20 @@ var dropdown_threads = React.createElement( var ListSortSettings = React.createClass({ render: function() { - var self = this; - return
+ return
- + + + + - - + +
} }); @@ -962,10 +962,10 @@ var MessageInList = React.createClass({ { var msg = this.props.msg; return
(msg[c] ? ' '+c : '')).join(''))+ - (this.state.selected ? ' selected' : '')+(msg.thread ? ' thread0' : '')} onMouseDown={this.onClick}> + (this.state.selected ? ' selected' : '')+(msg.thread && Store.threads ? ' thread0' : '')} onMouseDown={this.onClick}>
{msg.subject}
- {msg.thread ?
: null} + {msg.thread && Store.threads ?
: null}
{(msg.sent || msg.outgoing ? 'To '+msg.to : msg.from)}
{formatBytes(msg.size)}
@@ -975,6 +975,7 @@ var MessageInList = React.createClass({ } }); +// TODO: full keyboard navigation in message list, expand/collapse days, virtual scroll... var MessageList = React.createClass({ getInitialState: function() { @@ -1009,9 +1010,11 @@ var MessageList = React.createClass({ {grp.messages.map(msg => [ , (msg.thread ? -
- {msg.thread.map(reply => )} -
+ (Store.threads ? +
+ {msg.thread.map(reply => )} +
+ : msg.thread.map(reply => )) : null) ])}
@@ -1195,6 +1198,21 @@ var composeAccounts = [ var listGroups = [ { name: 'TODAY', + messages: [ { + subject: 'The Glossary of Happiness By Emily Anthes , May 12, 2016', + from: 'Margarita Philippova', + fromEmail: 'philippova.marga@gmail.com', + to: 'Виталий Филиппов', + time: '2016-06-20 00:11:18', + unread: true, + body: '
http://www.newyorker.com/tech/elements/the-glossary-of-happiness
\ +
\ +--
\ +Best regards,
\ + Margarita Philippova
' + } ] +}, { + name: 'LAST WEEK', messages: [ { subject: 'кошку хочешь?))', sent: true,