mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-07 16:48:02 +08:00
d15b5080fb
Summary: ThreadStore is now in the thread-list package. Account sidebar no longer has random stuff dealing with search, no longer maintains selection apart from FocusedTagStore Thread nav buttons are in the thread package Account sidebar pulls selection from FocusedTagStore, no longer fires an Action to select Inbox, which was weird Thread store is in thread-list package. No longer has any selection concept -> moved to FocusedThreadStore. Also looks at database changes to do "shallow" updates when only threads and not messages have changed, or when only messages of a few... ...threads have changed. WorkspaceStore now handles both pushing AND popping the thread sheet. So all sheet behavior is here. ThreadStore => FocusedThreadStore, selectThreadId => selectThread Include all models in inbox-exports It actually takes a long time to call Promise.reject because Bluebird generates stack traces. Resolve with false instead (100msec faster!) Cache the model class map. All the requires take ~20msec per call to this method ThreadList looks at FocusedThreadStore for selection FocusedThreadStore, FocusedTagStore Updated specs Test Plan: Run tests Reviewers: evan Reviewed By: evan Differential Revision: https://review.inboxapp.com/D1384
32 lines
901 B
CoffeeScript
32 lines
901 B
CoffeeScript
React = require 'react'
|
|
{Actions} = require("inbox-exports")
|
|
moment = require 'moment'
|
|
|
|
module.exports =
|
|
CalendarBarItem = React.createClass
|
|
render: ->
|
|
style =
|
|
left: @props.item.xPercent
|
|
top: @props.item.yPercent
|
|
width: @props.item.wPercent
|
|
height: @props.item.hPercent
|
|
zIndex: @props.item.z
|
|
<div className="event" style={style} id={@props.item.event.id}>
|
|
<span className="title">{@props.item.event.title}</span>
|
|
<span className="time">{@_time()}</span>
|
|
</div>
|
|
|
|
_time: ->
|
|
w = @props.item.event.when
|
|
if w.start_time
|
|
return moment.unix(w.start_time).format('h:mm a')
|
|
else if w.time
|
|
return moment.unix(w.time).format('h:mm a')
|
|
else if w.start_date
|
|
return moment.unix(w.start_date).format('MMMM Do')
|
|
else
|
|
return ""
|
|
|
|
_onClick: (event) ->
|
|
event.preventDefault()
|
|
Actions.focusTag(@props.tag)
|