Mailspring/internal_packages/message-templates/lib/main.cjsx
Ben Gotow eb6cc11a83 feature(templates): Pick templates, fill variable regions, Draft extensions
Summary:
fix(keymappings): Enter to focus item, logout works now

Minor fix for some problems with activity bar

Fix tabindex = 1 where tabindex should be =-1

Remove idgen that was causing footers to be replaced

WIP

Draft store extension hooks

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1320
2015-03-20 10:23:50 -07:00

29 lines
846 B
CoffeeScript

React = require "react"
{ComponentRegistry, DraftStore} = require 'inbox-exports'
TemplatePicker = require './template-picker'
TemplateStatusBar = require './template-status-bar'
Extension = require './draft-extension'
_ = require 'underscore-plus'
module.exports =
item: null # The DOM item the main React component renders into
activate: (@state={}) ->
ComponentRegistry.register
name: 'TemplatePicker'
role: 'Composer:ActionButton'
view: TemplatePicker
ComponentRegistry.register
name: 'TemplateStatusBar'
role: 'Composer:Footer'
view: TemplateStatusBar
DraftStore.registerExtension(Extension)
deactivate: ->
ComponentRegistry.unregister('TemplatePicker')
ComponentRegistry.unregister('TemplateStatusBar')
DraftStore.unregisterExtension(Extension)
serialize: -> @state