docs: use electron/main & electron/renderer imports in fiddles (#39666)
This commit is contained in:
parent
d42a94ddde
commit
f2f83a73fc
70 changed files with 78 additions and 88 deletions
|
@ -6,8 +6,9 @@ const {
|
|||
ipcMain,
|
||||
app,
|
||||
shell,
|
||||
dialog
|
||||
} = require('electron')
|
||||
dialog,
|
||||
autoUpdater
|
||||
} = require('electron/main')
|
||||
|
||||
const menu = new Menu()
|
||||
menu.append(new MenuItem({ label: 'Hello' }))
|
||||
|
@ -185,7 +186,7 @@ function addUpdateMenuItems (items, position) {
|
|||
visible: false,
|
||||
key: 'checkForUpdate',
|
||||
click: () => {
|
||||
require('electron').autoUpdater.checkForUpdates()
|
||||
autoUpdater.checkForUpdates()
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -194,7 +195,7 @@ function addUpdateMenuItems (items, position) {
|
|||
visible: false,
|
||||
key: 'restartToUpdate',
|
||||
click: () => {
|
||||
require('electron').autoUpdater.quitAndInstall()
|
||||
autoUpdater.quitAndInstall()
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue