mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
standardize
This commit is contained in:
@@ -651,15 +651,21 @@ app.setJumpList([
|
||||
name: 'Tools',
|
||||
items: [
|
||||
{
|
||||
type: 'task', title: 'Tool A',
|
||||
program: process.execPath, args: '--run-tool-a',
|
||||
icon: process.execPath, iconIndex: 0,
|
||||
type: 'task',
|
||||
title: 'Tool A',
|
||||
program: process.execPath,
|
||||
args: '--run-tool-a',
|
||||
icon: process.execPath,
|
||||
iconIndex: 0,
|
||||
description: 'Runs Tool A'
|
||||
},
|
||||
{
|
||||
type: 'task', title: 'Tool B',
|
||||
program: process.execPath, args: '--run-tool-b',
|
||||
icon: process.execPath, iconIndex: 0,
|
||||
type: 'task',
|
||||
title: 'Tool B',
|
||||
program: process.execPath,
|
||||
args: '--run-tool-b',
|
||||
icon: process.execPath,
|
||||
iconIndex: 0,
|
||||
description: 'Runs Tool B'
|
||||
}
|
||||
]
|
||||
@@ -668,14 +674,18 @@ app.setJumpList([
|
||||
{ // has no name and no type so `type` is assumed to be "tasks"
|
||||
items: [
|
||||
{
|
||||
type: 'task', title: 'New Project',
|
||||
program: process.execPath, args: '--new-project',
|
||||
type: 'task',
|
||||
title: 'New Project',
|
||||
program: process.execPath,
|
||||
args: '--new-project',
|
||||
description: 'Create a new project.'
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{
|
||||
type: 'task', title: 'Recover Project',
|
||||
program: process.execPath, args: '--recover-project',
|
||||
type: 'task',
|
||||
title: 'Recover Project',
|
||||
program: process.execPath,
|
||||
args: '--recover-project',
|
||||
description: 'Recover Project'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -119,10 +119,12 @@ const {app, Menu} = require('electron')
|
||||
|
||||
const dockMenu = Menu.buildFromTemplate([
|
||||
{label: 'New Window', click () { console.log('New Window') }},
|
||||
{label: 'New Window with Settings', submenu: [
|
||||
{label: 'Basic'},
|
||||
{label: 'Pro'}
|
||||
]},
|
||||
{label: 'New Window with Settings',
|
||||
submenu: [
|
||||
{label: 'Basic'},
|
||||
{label: 'Pro'}
|
||||
]
|
||||
},
|
||||
{label: 'New Command...'}
|
||||
])
|
||||
app.dock.setMenu(dockMenu)
|
||||
|
||||
Reference in New Issue
Block a user