31 lines
553 B
JavaScript
31 lines
553 B
JavaScript
const { app, BrowserWindow } = require('electron')
|
|
|
|
function createWindow() {
|
|
const win = new BrowserWindow({
|
|
width: 1200,
|
|
height: 800,
|
|
webPreferences: {
|
|
nodeIntegration: true
|
|
}
|
|
})
|
|
|
|
win.loadURL('https://photos.onedrive.com')
|
|
win.setTitle('OneDrive Photos')
|
|
}
|
|
|
|
app.whenReady().then(() => {
|
|
createWindow()
|
|
|
|
app.on('activate', () => {
|
|
if (BrowserWindow.getAllWindows().length === 0) {
|
|
createWindow()
|
|
}
|
|
})
|
|
})
|
|
|
|
app.on('window-all-closed', () => {
|
|
if (process.platform !== 'darwin') {
|
|
app.quit()
|
|
}
|
|
})
|