mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-18 20:37:14 +08:00
Merge pull request #7046 from rhysd/missing-menu-item-option
github-electron: Add missing menu item option 'role'
This commit is contained in:
@@ -125,7 +125,40 @@ var dockMenu = Menu.buildFromTemplate([
|
||||
<GitHubElectron.MenuItemOptions>{ label: 'Pro' }
|
||||
]
|
||||
},
|
||||
<GitHubElectron.MenuItemOptions>{ label: 'New Command...' }
|
||||
<GitHubElectron.MenuItemOptions>{ label: 'New Command...' },
|
||||
<GitHubElectron.MenuItemOptions>{
|
||||
label: 'Edit',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Undo',
|
||||
accelerator: 'CmdOrCtrl+Z',
|
||||
role: 'undo'
|
||||
},
|
||||
{
|
||||
label: 'Redo',
|
||||
accelerator: 'Shift+CmdOrCtrl+Z',
|
||||
role: 'redo'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Cut',
|
||||
accelerator: 'CmdOrCtrl+X',
|
||||
role: 'cut'
|
||||
},
|
||||
{
|
||||
label: 'Copy',
|
||||
accelerator: 'CmdOrCtrl+C',
|
||||
role: 'copy'
|
||||
},
|
||||
{
|
||||
label: 'Paste',
|
||||
accelerator: 'CmdOrCtrl+V',
|
||||
role: 'paste'
|
||||
},
|
||||
]
|
||||
},
|
||||
]);
|
||||
app.dock.setMenu(dockMenu);
|
||||
|
||||
|
||||
4
github-electron/github-electron.d.ts
vendored
4
github-electron/github-electron.d.ts
vendored
@@ -880,6 +880,10 @@ declare module GitHubElectron {
|
||||
* a given menu.
|
||||
*/
|
||||
position?: string;
|
||||
/**
|
||||
* Define the action of the menu item, when specified the click property will be ignored
|
||||
*/
|
||||
role?: string;
|
||||
}
|
||||
|
||||
class BrowserWindowProxy {
|
||||
|
||||
Reference in New Issue
Block a user