2017-09-27 02:42:18 +08:00
|
|
|
import { ComponentRegistry, WorkspaceStore } from 'mailspring-exports';
|
2016-05-10 04:18:07 +08:00
|
|
|
|
|
|
|
import ThreadList from './thread-list';
|
|
|
|
import ThreadListToolbar from './thread-list-toolbar';
|
2017-10-14 07:25:09 +08:00
|
|
|
import ThreadListEmptyFolderBar from './thread-list-empty-folder-bar';
|
2016-05-10 04:18:07 +08:00
|
|
|
import MessageListToolbar from './message-list-toolbar';
|
|
|
|
import SelectedItemsStack from './selected-items-stack';
|
|
|
|
|
2018-04-03 11:49:23 +08:00
|
|
|
import { UpButton, DownButton, MoveButtons, FlagButtons } from './thread-toolbar-buttons';
|
2016-05-10 04:18:07 +08:00
|
|
|
|
|
|
|
export function activate() {
|
2017-10-14 07:25:09 +08:00
|
|
|
ComponentRegistry.register(ThreadListEmptyFolderBar, {
|
|
|
|
location: WorkspaceStore.Location.ThreadList,
|
|
|
|
});
|
|
|
|
|
2016-05-10 04:18:07 +08:00
|
|
|
ComponentRegistry.register(ThreadList, {
|
|
|
|
location: WorkspaceStore.Location.ThreadList,
|
|
|
|
});
|
|
|
|
|
|
|
|
ComponentRegistry.register(SelectedItemsStack, {
|
|
|
|
location: WorkspaceStore.Location.MessageList,
|
|
|
|
modes: ['split'],
|
|
|
|
});
|
|
|
|
|
|
|
|
// Toolbars
|
|
|
|
ComponentRegistry.register(ThreadListToolbar, {
|
|
|
|
location: WorkspaceStore.Location.ThreadList.Toolbar,
|
|
|
|
modes: ['list'],
|
|
|
|
});
|
|
|
|
|
|
|
|
ComponentRegistry.register(MessageListToolbar, {
|
|
|
|
location: WorkspaceStore.Location.MessageList.Toolbar,
|
|
|
|
});
|
|
|
|
|
|
|
|
ComponentRegistry.register(DownButton, {
|
|
|
|
location: WorkspaceStore.Location.MessageList.Toolbar,
|
|
|
|
modes: ['list'],
|
|
|
|
});
|
|
|
|
|
|
|
|
ComponentRegistry.register(UpButton, {
|
|
|
|
location: WorkspaceStore.Location.MessageList.Toolbar,
|
|
|
|
modes: ['list'],
|
|
|
|
});
|
|
|
|
|
2018-04-03 11:49:23 +08:00
|
|
|
ComponentRegistry.register(MoveButtons, {
|
2016-05-10 04:18:07 +08:00
|
|
|
role: 'ThreadActionsToolbarButton',
|
|
|
|
});
|
|
|
|
|
2018-04-03 11:49:23 +08:00
|
|
|
ComponentRegistry.register(FlagButtons, {
|
2016-05-10 04:18:07 +08:00
|
|
|
role: 'ThreadActionsToolbarButton',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export function deactivate() {
|
|
|
|
ComponentRegistry.unregister(ThreadList);
|
|
|
|
ComponentRegistry.unregister(SelectedItemsStack);
|
|
|
|
ComponentRegistry.unregister(ThreadListToolbar);
|
|
|
|
ComponentRegistry.unregister(MessageListToolbar);
|
2018-04-03 11:49:23 +08:00
|
|
|
ComponentRegistry.unregister(MoveButtons);
|
|
|
|
ComponentRegistry.unregister(FlagButtons);
|
2016-05-10 04:18:07 +08:00
|
|
|
ComponentRegistry.unregister(UpButton);
|
|
|
|
ComponentRegistry.unregister(DownButton);
|
|
|
|
}
|