fix(acct-menu): Add option to add account from context menu

This commit is contained in:
Juan Tejada 2016-03-14 11:22:52 -07:00
parent 938933fc1e
commit 1e765a6b62

View file

@ -20,12 +20,17 @@ class AccountSwitcher extends React.Component
)
template = template.concat [
{type: 'separator'}
{label: 'Add Account...', click: @_onAddAccount}
{label: 'Manage Accounts...', click: @_onManageAccounts}
]
return template
# Handlers
_onAddAccount: =>
ipc = require('electron').ipcRenderer
ipc.send('command', 'application:add-account')
_onManageAccounts: =>
Actions.switchPreferencesTab('Accounts')
Actions.openPreferences()