Mailspring/app/internal_packages/open-tracking/lib/main.es6

32 lines
1.4 KiB
Text
Raw Normal View History

import { ComponentRegistry, ExtensionRegistry } from 'mailspring-exports';
2017-09-27 02:33:08 +08:00
import { HasTutorialTip } from 'nylas-component-kit';
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.',
});
export function activate() {
2017-09-27 02:33:08 +08:00
ComponentRegistry.register(OpenTrackingButtonWithTutorialTip, { role: 'Composer:ActionButton' });
2017-09-27 02:33:08 +08:00
ComponentRegistry.register(OpenTrackingIcon, { role: 'ThreadListIcon' });
2017-09-27 02:33:08 +08:00
ComponentRegistry.register(OpenTrackingMessageStatus, { role: 'MessageHeaderStatus' });
ExtensionRegistry.Composer.register(OpenTrackingComposerExtension);
}
export function serialize() {}
export function deactivate() {
ComponentRegistry.unregister(OpenTrackingButtonWithTutorialTip);
ComponentRegistry.unregister(OpenTrackingIcon);
ComponentRegistry.unregister(OpenTrackingMessageStatus);
ExtensionRegistry.Composer.unregister(OpenTrackingComposerExtension);
}