mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 13:44:41 +08:00
23 lines
480 B
Text
23 lines
480 B
Text
|
React = require 'react'
|
||
|
ActivityBar = require('./activity-bar')
|
||
|
|
||
|
module.exports =
|
||
|
item: null
|
||
|
|
||
|
activate: (@state={}) ->
|
||
|
unless @item?
|
||
|
@item = document.createElement("div")
|
||
|
@item.setAttribute("id", "activity-bar")
|
||
|
@item.setAttribute("class", "activity-bar")
|
||
|
|
||
|
atom.workspace.addRow(@item)
|
||
|
|
||
|
React.render(<ActivityBar />, @item)
|
||
|
|
||
|
deactivate: ->
|
||
|
React.unmountComponentAtNode(@item)
|
||
|
@item.remove()
|
||
|
@item = null
|
||
|
|
||
|
serialize: -> @state
|