Mailspring/internal_packages/account-sidebar/lib/main.coffee
Juan Tejada 2380e1eefa Update sidebar to hold state for selected account
- Ensures that it displays the correct set of sidebar items even when
  the perspective changes
- Also sets up hotkeys to switch currently focused accounts
2016-01-21 14:13:48 -08:00

16 lines
504 B
CoffeeScript

React = require "react"
AccountSidebar = require "./components/account-sidebar"
SidebarCommands = require "./sidebar-commands"
{ComponentRegistry, WorkspaceStore} = require "nylas-exports"
module.exports =
item: null # The DOM item the main React component renders into
activate: (@state) ->
ComponentRegistry.register AccountSidebar,
location: WorkspaceStore.Location.RootSidebar
SidebarCommands.register()
deactivate: (@state) ->
ComponentRegistry.unregister(AccountSidebar)