mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-29 11:52:34 +08:00
a46bad4eb7
Summary: Keymaps & menus CSON => JSON, remove AtomKeymaps, CommandRegistry use of CSS selectors, use Mousetrap instead Important Notes: - The `application:` prefix is reserved for commands which are handled in the application process. Don't use it for other things. You will not receive the events in the window. - Maintaining dynamic menus seems to come with quite an overhead, because Electron updates the entire menu every time. In the future, we'll need https://github.com/electron/electron/issues/528 to really make things nice. I will be tracking this upstream. - The format for keyboard shortcuts has changed. `cmd-X` is now `command+shift+x` Test Plan: Run tests Reviewers: juan, evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D2917
75 lines
3 KiB
Text
75 lines
3 KiB
Text
'menu': [
|
|
{ label: 'Add Account...', command: 'application:add-account' }
|
|
{
|
|
label: '&Edit'
|
|
submenu: [
|
|
{ label: '&Undo', command: 'core:undo' }
|
|
{ label: '&Redo', command: 'core:redo' }
|
|
{ type: 'separator' }
|
|
{ label: 'Cu&t', command: 'core:cut' }
|
|
{ label: '&Copy', command: 'core:copy' }
|
|
{ label: '&Paste', command: 'core:paste' }
|
|
{ label: 'Paste and Match Style', command: 'core:paste-and-match-style' }
|
|
{ label: 'Select &All', command: 'core:select-all' }
|
|
{ type: 'separator' }
|
|
{ label: 'Find', submenu: [
|
|
{ label: 'Find in Thread...', command: 'core:find-in-thread' }
|
|
{ label: 'Find Next', command: 'core:find-in-thread-next' }
|
|
{ label: 'Find Previous', command: 'core:find-in-thread-previous' }
|
|
] }
|
|
]
|
|
}
|
|
|
|
{
|
|
label: '&View'
|
|
submenu: [
|
|
{ label: 'Single Panel Mode', type: 'checkbox', command: 'application:select-list-mode' }
|
|
{ label: 'Two Panel Mode', type: 'checkbox', command: 'application:select-split-mode' }
|
|
{ type: 'separator' }
|
|
{ label: 'Toggle &Full Screen', command: 'window:toggle-full-screen' }
|
|
]
|
|
}
|
|
{
|
|
label: 'Developer'
|
|
submenu: [
|
|
{ label: 'Run with &Debug Flags', type: 'checkbox', command: 'application:toggle-dev' }
|
|
{ type: 'separator' }
|
|
{ label: '&Reload', command: 'window:reload' }
|
|
{ label: 'Toggle Developer &Tools', command: 'window:toggle-dev-tools' }
|
|
{ label: 'Toggle Component Regions', command: 'window:toggle-component-regions' }
|
|
{ label: 'Toggle Screenshot Mode', command: 'window:toggle-screenshot-mode' }
|
|
{ type: 'separator' }
|
|
{ label: 'Open Activity Window', command: 'application:show-work-window' }
|
|
{ type: 'separator' }
|
|
{ label: 'Create a Plugin...', command: 'application:create-package' }
|
|
{ label: 'Install a Plugin...', command: 'application:install-package' }
|
|
{ type: 'separator' }
|
|
{ label: 'Run Plugin &Specs...', command: 'application:run-package-specs' }
|
|
{ label: 'Run &N1 Specs', command: 'application:run-all-specs' }
|
|
{ type: 'separator' }
|
|
{ label: 'Open Detailed Logs', command: 'window:open-errorlogger-logs' }
|
|
]
|
|
}
|
|
{
|
|
label: '&Help'
|
|
submenu: [
|
|
{ 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' }
|
|
{ label: 'Nylas N1 Help', command: 'application:view-help' }
|
|
]
|
|
}
|
|
{ type: 'separator' }
|
|
{ label: 'Preferences', command: 'application:open-preferences' }
|
|
{ label: 'Change Theme...', command: 'window:launch-theme-picker' }
|
|
{ label: 'Install Theme...', command: 'application:install-package' }
|
|
{ type: 'separator' }
|
|
{ label: 'Print Current Thread', command: 'core:print-thread' }
|
|
{ type: 'separator' }
|
|
{ label: 'E&xit', command: 'application:quit' }
|
|
]
|
|
|
|
'context-menu':[
|
|
]
|