mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 21:57:55 +08:00
24 lines
792 B
Text
24 lines
792 B
Text
|
import {ComponentRegistry, DraftStore} from 'nylas-exports';
|
||
|
import TemplatePicker from './template-picker';
|
||
|
import TemplateStatusBar from './template-status-bar';
|
||
|
import Extension from './template-draft-extension';
|
||
|
|
||
|
module.exports = {
|
||
|
item: null, // The DOM item the main React component renders into
|
||
|
|
||
|
activate(state = {}) {
|
||
|
this.state = state;
|
||
|
ComponentRegistry.register(TemplatePicker, {role: 'Composer:ActionButton'});
|
||
|
ComponentRegistry.register(TemplateStatusBar, {role: 'Composer:Footer'});
|
||
|
return DraftStore.registerExtension(Extension);
|
||
|
},
|
||
|
|
||
|
deactivate() {
|
||
|
ComponentRegistry.unregister(TemplatePicker);
|
||
|
ComponentRegistry.unregister(TemplateStatusBar);
|
||
|
return DraftStore.unregisterExtension(Extension);
|
||
|
},
|
||
|
|
||
|
serialize() { return this.state; },
|
||
|
};
|