2017-09-27 02:42:18 +08:00
|
|
|
import { ComponentRegistry, ExtensionRegistry } from 'mailspring-exports';
|
2017-09-27 02:33:08 +08:00
|
|
|
import { HasTutorialTip } from 'nylas-component-kit';
|
2017-09-07 07:19:48 +08:00
|
|
|
import SendRemindersThreadTimestamp from './send-reminders-thread-timestamp';
|
|
|
|
import SendRemindersComposerButton from './send-reminders-composer-button';
|
|
|
|
import SendRemindersToolbarButton from './send-reminders-toolbar-button';
|
2017-09-27 02:33:08 +08:00
|
|
|
import {
|
|
|
|
ScheduledReminderThreadHeader,
|
|
|
|
NotificationExplanationMessageHeader,
|
|
|
|
} from './send-reminders-headers';
|
2017-09-07 07:19:48 +08:00
|
|
|
import SendRemindersStore from './send-reminders-store';
|
|
|
|
import * as ThreadListExtension from './send-reminders-thread-list-extension';
|
|
|
|
import * as AccountSidebarExtension from './send-reminders-account-sidebar-extension';
|
|
|
|
|
|
|
|
const ComposerButtonWithTip = HasTutorialTip(SendRemindersComposerButton, {
|
2017-09-27 02:33:08 +08:00
|
|
|
title: 'Get reminded!',
|
|
|
|
instructions:
|
|
|
|
"Get reminded if you don't receive a reply for this message within a specified time.",
|
2017-09-07 07:19:48 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
export function activate() {
|
2017-09-27 02:33:08 +08:00
|
|
|
ComponentRegistry.register(ComposerButtonWithTip, { role: 'Composer:ActionButton' });
|
|
|
|
ComponentRegistry.register(SendRemindersToolbarButton, { role: 'ThreadActionsToolbarButton' });
|
|
|
|
ComponentRegistry.register(SendRemindersThreadTimestamp, { role: 'ThreadListTimestamp' });
|
|
|
|
ComponentRegistry.register(NotificationExplanationMessageHeader, { role: 'MessageHeader' });
|
|
|
|
ComponentRegistry.register(ScheduledReminderThreadHeader, { role: 'MessageListHeaders' });
|
|
|
|
ExtensionRegistry.ThreadList.register(ThreadListExtension);
|
|
|
|
ExtensionRegistry.AccountSidebar.register(AccountSidebarExtension);
|
|
|
|
SendRemindersStore.activate();
|
2017-09-07 07:19:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export function deactivate() {
|
2017-09-27 02:33:08 +08:00
|
|
|
ComponentRegistry.unregister(ComposerButtonWithTip);
|
|
|
|
ComponentRegistry.unregister(SendRemindersToolbarButton);
|
2017-09-07 07:19:48 +08:00
|
|
|
ComponentRegistry.unregister(SendRemindersThreadTimestamp);
|
2017-09-26 06:44:20 +08:00
|
|
|
ComponentRegistry.unregister(NotificationExplanationMessageHeader);
|
|
|
|
ComponentRegistry.unregister(ScheduledReminderThreadHeader);
|
2017-09-27 02:33:08 +08:00
|
|
|
ExtensionRegistry.ThreadList.unregister(ThreadListExtension);
|
|
|
|
ExtensionRegistry.AccountSidebar.unregister(AccountSidebarExtension);
|
|
|
|
SendRemindersStore.deactivate();
|
2017-09-07 07:19:48 +08:00
|
|
|
}
|