2017-09-27 02:42:18 +08:00
import { ComponentRegistry, ExtensionRegistry } from 'mailspring-exports';
2017-09-27 02:46:00 +08:00
import { HasTutorialTip } from 'mailspring-component-kit';
2017-09-07 07:19:48 +08:00
import OpenTrackingButton from './open-tracking-button';
import OpenTrackingIcon from './open-tracking-icon';
import OpenTrackingMessageStatus from './open-tracking-message-status';
import OpenTrackingComposerExtension from './open-tracking-composer-extension';
const OpenTrackingButtonWithTutorialTip = HasTutorialTip(OpenTrackingButton, {
2017-09-27 02:33:08 +08:00
title: 'See when recipients open this email',
instructions:
'When enabled, Mailspring will notify you as soon as someone reads this message. Sending to a group? Mailspring shows you which recipients opened your email so you can follow up with precision.',
2017-09-07 07:19:48 +08:00
});
export function activate() {
2017-09-27 02:33:08 +08:00
ComponentRegistry.register(OpenTrackingButtonWithTutorialTip, { role: 'Composer:ActionButton' });
2017-09-07 07:19:48 +08:00
2017-09-27 02:33:08 +08:00
ComponentRegistry.register(OpenTrackingIcon, { role: 'ThreadListIcon' });
2017-09-07 07:19:48 +08:00
2017-09-27 02:33:08 +08:00
ComponentRegistry.register(OpenTrackingMessageStatus, { role: 'MessageHeaderStatus' });
2017-09-07 07:19:48 +08:00
ExtensionRegistry.Composer.register(OpenTrackingComposerExtension);
}
export function serialize() {}
export function deactivate() {
ComponentRegistry.unregister(OpenTrackingButtonWithTutorialTip);
ComponentRegistry.unregister(OpenTrackingIcon);
ComponentRegistry.unregister(OpenTrackingMessageStatus);
ExtensionRegistry.Composer.unregister(OpenTrackingComposerExtension);
}