mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-13 13:19:34 +08:00
214c8b2aaa
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
74 lines
2.2 KiB
Text
74 lines
2.2 KiB
Text
'menu': [
|
|
{
|
|
label: 'Edgehill'
|
|
submenu: [
|
|
{ label: 'About Edgehill', command: 'application:about' }
|
|
{ label: 'Link External Account', command: 'atom-workspace:add-account' }
|
|
{ label: 'Log Out', command: 'application:logout' }
|
|
{ label: 'VERSION', enabled: false }
|
|
{ label: 'Restart and Install Update', command: 'application:install-update', visible: false}
|
|
{ label: 'Check for Update', command: 'application:check-for-update', visible: false}
|
|
{ label: 'Downloading Update', enabled: false, visible: false}
|
|
{ type: 'separator' }
|
|
{ type: 'separator' }
|
|
{ label: 'Services', submenu: [] }
|
|
{ type: 'separator' }
|
|
{ label: 'Hide Edgehill', command: 'application:hide' }
|
|
{ label: 'Hide Others', command: 'application:hide-other-applications' }
|
|
{ label: 'Show All', command: 'application:unhide-all-applications' }
|
|
{ type: 'separator' }
|
|
{ label: 'Quit', command: 'application:quit' }
|
|
]
|
|
}
|
|
{
|
|
label: 'File'
|
|
submenu: [
|
|
{ label: 'New Message', command: 'application:new-message' }
|
|
{ type: 'separator' }
|
|
{ label: 'Close Window', command: 'window:close' }
|
|
]
|
|
}
|
|
|
|
{
|
|
label: 'Edit'
|
|
submenu: [
|
|
{ label: 'Undo', command: 'core:undo' }
|
|
{ label: 'Redo', command: 'core:redo' }
|
|
{ type: 'separator' }
|
|
{ label: 'Cut', command: 'core:cut' }
|
|
{ label: 'Copy', 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: 'Window'
|
|
submenu: [
|
|
{ label: 'Minimize', command: 'application:minimize' }
|
|
{ label: 'Zoom', command: 'application:zoom' }
|
|
{ type: 'separator' }
|
|
{ label: 'Message Viewer', command: 'application:show-main-window' }
|
|
{ type: 'separator' }
|
|
{ label: 'Bring All to Front', command: 'application:bring-all-windows-to-front' }
|
|
]
|
|
}
|
|
|
|
{
|
|
label: 'Help'
|
|
submenu: [
|
|
{ label: 'Report Issue', command: 'application:report-issue' }
|
|
]
|
|
}
|
|
]
|
|
|
|
'context-menu': [
|
|
]
|