mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 18:23:21 +08:00
564ecca8e0
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
72 lines
2.2 KiB
CoffeeScript
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
|