Skip to content

Commit

Permalink
add edit menu
Browse files Browse the repository at this point in the history
  • Loading branch information
iwate committed Sep 9, 2020
1 parent c02e5eb commit e58da3a
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions src/Aiplugs.PoshApp.Electron/src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const rpc = require('vscode-jsonrpc')
const isDevelopment = process.env.NODE_ENV !== 'production'

const isMac = process.platform === 'darwin'
/*Menu.setApplicationMenu(Menu.buildFromTemplate([
Menu.setApplicationMenu(Menu.buildFromTemplate([
// { role: 'appMenu' }
...(isMac ? [{
label: app.name,
Expand All @@ -28,7 +28,35 @@ const isMac = process.platform === 'darwin'
{ role: 'quit' }
]
}] : []),
// { role: 'editMenu' }
{
label: 'Edit',
submenu: [
{ role: 'undo' },
{ role: 'redo' },
{ type: 'separator' },
{ role: 'cut' },
{ role: 'copy' },
{ role: 'paste' },
...(isMac ? [
{ role: 'pasteAndMatchStyle' },
{ role: 'delete' },
{ role: 'selectAll' },
{ type: 'separator' },
{
label: 'Speech',
submenu: [
{ role: 'startspeaking' },
{ role: 'stopspeaking' }
]
}
] : [
{ role: 'delete' },
{ type: 'separator' },
{ role: 'selectAll' }
])
]
},
// { role: 'viewMenu' }
{
label: 'View',
Expand Down Expand Up @@ -82,7 +110,7 @@ const isMac = process.platform === 'darwin'
},
]
}
]))*/
]))

let win

Expand Down

0 comments on commit e58da3a

Please sign in to comment.