Mailspring/menus/linux.cson
Ben Gotow e8f7f76080 feat(window-manager): Refactor window code, actually destroy main window when logging out
Summary:
Resolves T1200 and probably others.

This diff moves all the window management / hot loading into a new class called the WindowManager
and also changes the way the app transitions between onboarding and main window. When you log out,
the main window clears config and clearing the config causes the window manager to close the main
window and open the login window. When it detects a token again, it opens the main window.

This means you can't:
- Open the main window from the login window
- Open mailto: links and accidentally see the main window or a composer, since the draft store isn't
  running anywhere.
- Don't need to worry about properly resetting thigns when namespaces change, since the window
  is now actually re-created from scratch with the new auth token.

Be a little more defensive about namespace checks in draft-store

Move window code to window-manager

Rename AtomApplication to just `Application`

Specs fix

Test Plan: Run tests, would be good to have more for this.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1200

Differential Revision: https://review.inboxapp.com/D1501
2015-05-14 14:54:29 -07:00

48 lines
1.2 KiB
Plaintext

'menu': [
{
label: '&File'
submenu: [
{ label: '&New Message', command: 'application:new-message' }
{ type: 'separator' }
{ label: 'Link External Account', command: 'atom-workspace:add-account' }
{ label: 'Log Out', command: 'application:logout' }
{ label: 'Clos&e Window', command: 'window:close' }
{ label: 'Quit', command: 'application:quit' }
]
}
{
label: '&Edit'
submenu: [
{ label: '&Undo', command: 'core:undo' }
{ label: '&Redo', command: 'core:redo' }
{ type: 'separator' }
{ label: '&Cut', command: 'core:cut' }
{ label: 'C&opy', command: 'core:copy' }
{ label: '&Paste', command: 'core:paste' }
{ label: 'Select &All', command: 'core:select-all' }
]
}
{
label: '&View'
submenu: [
{ label: '&Reload', command: 'window:reload' }
{ label: 'Toggle &Full Screen', command: 'window:toggle-full-screen' }
{ label: 'Toggle Menu Bar', command: 'window:toggle-menu-bar' }
]
}
{
label: '&Help'
submenu: [
{ label: "VERSION", enabled: false }
{ type: 'separator' }
{ label: 'Report Issue', command: 'application:report-issue' }
]
}
]
'context-menu':[
]