Mailspring/internal_packages/draft-list/lib/main.es6
Juan Tejada e83bf2bbec feat(selection): Add new display for selection count + update toolbar
Summary:
- New behavior is that the in split mode, you will perform actions on
  the selection via the MessageListToolbar (the toolbar positioned above
  the message list)
- Refactored and moved around a bunch of code to achieve this:
  - Mostly renaming stuff and moving stuff around and removing some
    duplication
  - Update naming of toolbar role to a single role, and update relevant code
  - Converted and refactored a bunch of code into ES6, specifically to reuse the code for the ThreadActionsToolbar at the 2 locations
  - Deprecated MultiselectActionBar in favor of MultiselectToolbar
  - Deprecated old roles
- Punted the animation for the stackable cards in the selection display for now.
- #370

Test Plan: - Manual and unit tests

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2756
2016-03-21 12:20:11 -07:00

28 lines
996 B
JavaScript

import {WorkspaceStore, ComponentRegistry} from 'nylas-exports'
import DraftList from './draft-list'
import DraftListToolbar from './draft-list-toolbar'
import DraftListSendStatus from './draft-list-send-status'
import {DraftDeleteButton} from "./draft-toolbar-buttons"
export function activate() {
WorkspaceStore.defineSheet(
'Drafts',
{root: true},
{list: ['RootSidebar', 'DraftList']}
)
ComponentRegistry.register(DraftList, {location: WorkspaceStore.Location.DraftList})
ComponentRegistry.register(DraftListToolbar, {location: WorkspaceStore.Location.DraftList.Toolbar})
ComponentRegistry.register(DraftDeleteButton, {role: 'DraftActionsToolbarButton'})
ComponentRegistry.register(DraftListSendStatus, {role: 'DraftList:DraftStatus'})
}
export function deactivate() {
ComponentRegistry.unregister(DraftList)
ComponentRegistry.unregister(DraftListToolbar)
ComponentRegistry.unregister(DraftDeleteButton)
ComponentRegistry.unregister(DraftListSendStatus)
}