mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-05 04:04:38 +08:00
fix(acct-menu): Add option to add account from context menu
This commit is contained in:
parent
938933fc1e
commit
1e765a6b62
1 changed files with 5 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue