Mailspring/internal_packages/message-list/lib/main.cjsx
Evan Morikawa 564ecca8e0 feat(sidebar): add more Salesforce states
Summary:
add more Salesforce states

more salesforce sidebar

extract focused contacts into its own store

fullcontact store fixes

extract thread participants to own module

typo

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1326
2015-03-20 16:31:35 -07:00

72 lines
2.2 KiB
CoffeeScript

React = require "react"
MessageList = require "./message-list"
MessageToolbarItems = require "./message-toolbar-items"
MessageSubjectItem = require "./message-subject-item"
{ComponentRegistry, WorkspaceStore} = require 'inbox-exports'
SidebarThreadParticipants = require "./sidebar-thread-participants"
{RetinaImg} = require 'ui-components'
DownButton = React.createClass
render: ->
<div className="message-toolbar-arrow down" onClick={@_onClick}>
<RetinaImg name="toolbar-down-arrow.png"/>
</div>
_onClick: ->
atom.commands.dispatch(document.body, 'application:next-item')
UpButton = React.createClass
render: ->
<div className="message-toolbar-arrow up" onClick={@_onClick}>
<RetinaImg name="toolbar-up-arrow.png"/>
</div>
_onClick: ->
atom.commands.dispatch(document.body, 'application:previous-item')
module.exports =
item: null # The DOM item the main React component renders into
activate: (@state={}) ->
# Register Message List Actions we provide globally
ComponentRegistry.register
name: 'MessageList'
view: MessageList
location: WorkspaceStore.Location.MessageList
ComponentRegistry.register
name: 'MessageToolbarItems'
view: MessageToolbarItems
location: WorkspaceStore.Location.MessageList.Toolbar
ComponentRegistry.register
name: 'MessageSubjectItem'
view: MessageSubjectItem
location: WorkspaceStore.Location.MessageList.Toolbar
ComponentRegistry.register
name: 'DownButton'
mode: 'list'
view: DownButton
location: WorkspaceStore.Sheet.Thread.Toolbar.Right
ComponentRegistry.register
name: 'UpButton'
mode: 'list'
view: UpButton
location: WorkspaceStore.Sheet.Thread.Toolbar.Right
ComponentRegistry.register
name: 'SidebarThreadParticipants'
location: WorkspaceStore.Location.MessageListSidebar
view: SidebarThreadParticipants
deactivate: ->
ComponentRegistry.unregister 'MessageToolbarItems'
ComponentRegistry.unregister 'MessageSubjectItem'
ComponentRegistry.unregister 'MessageList'
ComponentRegistry.unregister 'DownButton'
ComponentRegistry.unregister 'UpButton'
serialize: -> @state