mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 05:41:05 +08:00
0468cb4b39
Summary: Initial hooks for reply to message Per-message actions and reply to message! Always commit changes before openinig popout composer Flip message display - newest at bottom like Gmail WIP specs New activity bar inspector for deltas Don't allow long polling connection to restart after end() called A bit of activity bar refactoring and filter options, clear Include "On ... someone wrote" in replies / fw Slightly more robust quoted text removal, detects "On..." Abort request to really end it Additional specs for draft store Test Plan: Run 20 new tests! Reviewers: evan Reviewed By: evan Differential Revision: https://review.inboxapp.com/D1230
31 lines
871 B
CoffeeScript
31 lines
871 B
CoffeeScript
React = require 'react/addons'
|
|
moment = require 'moment'
|
|
|
|
|
|
module.exports =
|
|
ActivityBarLongPollItem = React.createClass
|
|
displayName: 'ActivityBarLongPollItem'
|
|
|
|
getInitialState: ->
|
|
expanded: false
|
|
|
|
render: ->
|
|
if @state.expanded
|
|
payload = JSON.stringify(@props.item)
|
|
else
|
|
payload = []
|
|
|
|
itemId = @props.item.id
|
|
itemVersion = @props.item.version || @props.item.attributes?.version
|
|
itemId += " (version #{itemVersion})" if itemVersion
|
|
|
|
timestamp = moment(@props.item.timestamp).format("h:mm:ss")
|
|
|
|
<div className={"item"} onClick={ => @setState expanded: not @state?.expanded}>
|
|
<div className="cursor">{@props.item.cursor}</div>
|
|
{" #{timestamp}: #{@props.item.event} #{@props.item.object} #{itemId}"}
|
|
<div className="payload" onClick={ (e) -> e.stopPropagation() }>
|
|
{payload}
|
|
</div>
|
|
</div>
|
|
|