remove electron augmentation and use current API (#4138)

This commit is contained in:
Dimitri Mitropoulos 2021-10-26 15:45:36 -04:00 committed by GitHub
parent b29a0f2602
commit 9b8bce5015
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 12 deletions

View File

@ -1,6 +0,0 @@
declare module 'electron' {
export interface MenuItemConstructorOptions {
// see: https://github.com/electron/electron/issues/30719 for why this module augmentation is necessary.
selector?: string;
}
}

View File

@ -186,12 +186,12 @@ export function createWindow() {
{
label: `${MNEMONIC_SYM}Undo`,
accelerator: 'CmdOrCtrl+Z',
selector: 'undo:',
role: 'undo',
},
{
label: `${MNEMONIC_SYM}Redo`,
accelerator: 'Shift+CmdOrCtrl+Z',
selector: 'redo:',
role: 'redo',
},
{
type: 'separator',
@ -199,22 +199,22 @@ export function createWindow() {
{
label: `Cu${MNEMONIC_SYM}t`,
accelerator: 'CmdOrCtrl+X',
selector: 'cut:',
role: 'cut',
},
{
label: `${MNEMONIC_SYM}Copy`,
accelerator: 'CmdOrCtrl+C',
selector: 'copy:',
role: 'copy',
},
{
label: `${MNEMONIC_SYM}Paste`,
accelerator: 'CmdOrCtrl+V',
selector: 'paste:',
role: 'paste',
},
{
label: `Select ${MNEMONIC_SYM}All`,
accelerator: 'CmdOrCtrl+A',
selector: 'selectAll:',
role: 'selectAll',
},
],
};