mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 13:44:41 +08:00
647aed5f14
Summary: - Include ES6 files in spec-suite - Fix template store specs - Refactors TemplateStore a little bit to adjust to specs - Convert coffe .cjsx files to ES6 .jsx files - Fix TemplateDraftStoreExtension functions - Update ComposerTemplates example README Test Plan: - Plugin unit tests Reviewers: bengotow, evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D2250
23 lines
792 B
JavaScript
23 lines
792 B
JavaScript
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; },
|
|
};
|