2018-10-07 14:27:27 +08:00
import { localized , 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 , {
2018-10-07 14:27:27 +08:00
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.'
) ,
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 ) ;
}