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

33 lines
1.4 KiB
TypeScript
Raw Normal View History

import { localized, ComponentRegistry, ExtensionRegistry } from 'mailspring-exports';
2017-09-27 02:46:00 +08:00
import { HasTutorialTip } from 'mailspring-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, {
title: localized('See when recipients open this email'),
instructions: localized(
'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);
}